Fix metatypes source dependencies for non-prefix build

Change-Id: I0b262929f74c8da10f42d9ddbc7c119dc21619cf
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
Leander Beernaert 2020-02-12 10:30:48 +01:00 committed by Alexandru Croitor
parent f4a52b79ce
commit 36089f5e77

View File

@ -730,6 +730,10 @@ function(qt6_generate_meta_types_json_file target)
file(MAKE_DIRECTORY "${target_binary_dir}/meta_types")
file(TOUCH ${metatypes_file})
endif()
if (arg_COPY_OVER_INSTALL AND NOT EXISTS ${arg_INSTALL_DIR}/${metatypes_file_name})
file(MAKE_DIRECTORY "${arg_INSTALL_DIR}")
file(TOUCH "${arg_INSTALL_DIR}/${metatypes_file_name}")
endif()
add_custom_command(OUTPUT ${metatypes_file_gen} ${metatypes_file}
DEPENDS ${QT_CMAKE_EXPORT_NAMESPACE}::moc ${automoc_dependencies} ${manual_dependencies}
COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::moc