From 4954adea39cb9e02be36c9b786016ac2802fcbb9 Mon Sep 17 00:00:00 2001 From: Christophe Giboudeaux Date: Sun, 26 Jan 2020 12:25:40 +0100 Subject: Don't hardcode the include directory name Hardcoding "lib" caused build issues and wrong INTERFACE_INCLUDE_DIRECTORIES paths in generated CMake configuration files if INSTALL_INCLUDEDIR pointed to a different location. Contributes to QTBUG-81289 Change-Id: I3276ecbb4bf5df1c0b4c496c0287b4a69586d683 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor --- cmake/QtBaseGlobalTargets.cmake | 2 +- cmake/QtBuild.cmake | 12 ++++++------ cmake/QtPostProcess.cmake | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) (limited to 'cmake') diff --git a/cmake/QtBaseGlobalTargets.cmake b/cmake/QtBaseGlobalTargets.cmake index a8189dad5f..fb27618499 100644 --- a/cmake/QtBaseGlobalTargets.cmake +++ b/cmake/QtBaseGlobalTargets.cmake @@ -4,7 +4,7 @@ add_library(Qt::Platform ALIAS Platform) target_include_directories(Platform INTERFACE $ - $ + $ $ $ ) diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index e23d0e93d1..22cfcaa510 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -931,8 +931,8 @@ function(qt_internal_module_info result target) string(REPLACE "." "_" define "${define}") set("${result}_upper" "${upper}" PARENT_SCOPE) set("${result}_lower" "${lower}" PARENT_SCOPE) - set("${result}_repo_include_dir" "${QT_BUILD_DIR}/include" PARENT_SCOPE) - set("${result}_include_dir" "${QT_BUILD_DIR}/include/${module}" PARENT_SCOPE) + set("${result}_repo_include_dir" "${QT_BUILD_DIR}/${INSTALL_INCLUDEDIR}" PARENT_SCOPE) + set("${result}_include_dir" "${QT_BUILD_DIR}/${INSTALL_INCLUDEDIR}/${module}" PARENT_SCOPE) set("${result}_define" "${define}" PARENT_SCOPE) endfunction() @@ -1715,7 +1715,7 @@ function(qt_add_module target) if(NOT arg_NO_MODULE_HEADERS AND NOT arg_NO_SYNC_QT) # For the syncqt headers - list(APPEND ${public_headers_list} "$") + list(APPEND ${public_headers_list} "$") endif() list(APPEND ${public_headers_list} ${arg_PUBLIC_INCLUDE_DIRECTORIES}) @@ -1947,8 +1947,8 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})") "$") else() list(APPEND interface_includes - "$" - "$") + "$" + "$") endif() endif() endif() @@ -2796,7 +2796,7 @@ function(qt_add_test name) set(private_includes "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" - "$" + "$" ${arg_INCLUDE_DIRECTORIES} ) diff --git a/cmake/QtPostProcess.cmake b/cmake/QtPostProcess.cmake index ab2cab447f..afd1cfd1dd 100644 --- a/cmake/QtPostProcess.cmake +++ b/cmake/QtPostProcess.cmake @@ -1,6 +1,6 @@ function(qt_internal_write_depends_file target) set(module Qt${target}) - set(outfile "${QT_BUILD_DIR}/include/${module}/${module}Depends") + set(outfile "${QT_BUILD_DIR}/${INSTALL_INCLUDEDIR}/${module}/${module}Depends") message("Generate ${outfile}...") set(contents "/* This file was generated by cmake with the info from ${module} target. */\n") string(APPEND contents "#ifdef __cplusplus /* create empty PCH in C mode */\n") -- cgit v1.2.3 From 465949420a877099247d94dd4db54d19ca5a9a7c Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Fri, 31 Jan 2020 14:44:52 +0100 Subject: Update add_custom_command and add_custom_target dependencies If we don't add the executable used by the custom_target and/or custom_command to list of the command's/target's dependencies (DEPENDS) the generated file will not update should the executable change. Change-Id: Idce30f3dd4f756d9e8f6848c5e16f5dd6c7c8f0a Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor --- .../find-modules/FindWaylandScanner.cmake | 12 +++++++++--- cmake/QtBuild.cmake | 8 +++++++- cmake/QtResource.cmake.in | 21 ++++++++++++++------- 3 files changed, 30 insertions(+), 11 deletions(-) (limited to 'cmake') diff --git a/cmake/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake b/cmake/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake index ed9c4c4c9a..13291afcda 100644 --- a/cmake/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake +++ b/cmake/3rdparty/extra-cmake-modules/find-modules/FindWaylandScanner.cmake @@ -129,11 +129,15 @@ function(ecm_add_wayland_client_protocol out_var) add_custom_command(OUTPUT "${_client_header}" COMMAND ${WaylandScanner_EXECUTABLE} client-header ${_infile} ${_client_header} - DEPENDS ${_infile} VERBATIM) + DEPENDS ${WaylandScanner_EXECUTABLE} ${_infile} + VERBATIM + ) add_custom_command(OUTPUT "${_code}" COMMAND ${WaylandScanner_EXECUTABLE} code ${_infile} ${_code} - DEPENDS ${_infile} ${_client_header} VERBATIM) + DEPENDS ${WaylandScanner_EXECUTABLE} ${_infile} ${_client_header} + VERBATIM + ) list(APPEND ${out_var} "${_client_header}" "${_code}") set(${out_var} ${${out_var}} PARENT_SCOPE) @@ -160,7 +164,9 @@ function(ecm_add_wayland_server_protocol out_var) add_custom_command(OUTPUT "${_server_header}" COMMAND ${WaylandScanner_EXECUTABLE} server-header ${_infile} ${_server_header} - DEPENDS ${_infile} VERBATIM) + DEPENDS ${WaylandScanner_EXECUTABLE} ${_infile} + VERBATIM + ) list(APPEND ${out_var} "${_server_header}") set(${out_var} ${${out_var}} PARENT_SCOPE) diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 22cfcaa510..39e3f6fb27 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -3398,7 +3398,7 @@ function(qt_create_qdbusxml2cpp_command target infile) add_custom_command(OUTPUT "${header_file}" "${source_file}" COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qdbusxml2cpp ${arg_FLAGS} "${option}" "${header_file}:${source_file}" "${absolute_in_file_path}" - DEPENDS "${absolute_in_file_path}" + DEPENDS "${absolute_in_file_path}" ${QT_CMAKE_EXPORT_NAMESPACE}::qdbusxml2cpp WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" VERBATIM) @@ -3486,6 +3486,7 @@ function(qt_add_docs) # qtattributionsscanner add_custom_target(qattributionsscanner_${target} + DEPENDS ${qattributionsscanner_bin} COMMAND ${qtattributionsscanner_bin} ${PROJECT_SOURCE_DIR} --filter "QDocModule=${qdoc_target}" @@ -3518,6 +3519,7 @@ function(qt_add_docs) ) add_custom_target(prepare_docs_${target} + DEPENDS ${qdoc_bin} COMMAND ${CMAKE_COMMAND} -E env ${qdoc_env_args} ${qdoc_bin} ${prepare_qdoc_args} @@ -3536,6 +3538,7 @@ function(qt_add_docs) ) add_custom_target(generate_docs_${target} + DEPENDS ${qdoc_bin} COMMAND ${CMAKE_COMMAND} -E env ${qdoc_env_args} ${qdoc_bin} ${generate_qdocs_args} @@ -3553,6 +3556,7 @@ function(qt_add_docs) ) add_custom_target(html_docs_${target} + DEPENDS ${qdoc_bin} COMMAND ${CMAKE_COMMAND} -E env ${qdoc_env_args} ${qdoc_bin} ${html_qdocs_args} @@ -3565,6 +3569,7 @@ function(qt_add_docs) set(qch_file_path ${qdoc_output_dir}/${qch_file_name}) add_custom_target(qch_docs_${target} + DEPENDS ${qhelpgenerator_bin} COMMAND ${qhelpgenerator_bin} "${qdoc_output_dir}/${doc_target}.qhp" -o "${qch_file_path}" @@ -3885,6 +3890,7 @@ function(qt_process_qlalr consuming_target input_file_list flags) add_custom_command( OUTPUT ${cpp_file} ${private_file} ${decl_file} ${impl_file} COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::qlalr ${flags} ${input_file} + DEPENDS ${QT_CMAKE_EXPORT_NAMESPACE}::qlalr MAIN_DEPENDENCY ${input_file} ) target_sources(${consuming_target} PRIVATE ${cpp_file} ${impl_file}) diff --git a/cmake/QtResource.cmake.in b/cmake/QtResource.cmake.in index 2f8f77eb79..84a275bc67 100644 --- a/cmake/QtResource.cmake.in +++ b/cmake/QtResource.cmake.in @@ -102,13 +102,15 @@ function(__qt_quick_compiler_process_resources target resource_name) endif() add_custom_command( OUTPUT ${compiled_file} - DEPENDS ${file_absolute} ${QT_TOOL_PATH_SETUP_COMMAND} COMMAND @QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen - --resource-path ${file_resource_path} - -o ${compiled_file} - ${file_absolute} + --resource-path "${file_resource_path}" + -o "${compiled_file}" + "${file_absolute}" + DEPENDS + $ + "${file_absolute}" ) target_sources(${target} PRIVATE ${compiled_file}) endforeach() @@ -136,14 +138,16 @@ function(__qt_quick_compiler_process_resources target resource_name) add_custom_command( OUTPUT ${qmlcache_loader_file} - DEPENDS ${qmlcache_loader_list} ${QT_TOOL_PATH_SETUP_COMMAND} COMMAND @QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen ${retained_args} --resource-name "${resource_name_arg}" - -o ${qmlcache_loader_file} + -o "${qmlcache_loader_file}" "@${qmlcache_loader_list}" + DEPENDS + $ + "${qmlcache_loader_list}" ) __qt_propagate_generated_resource(${target} @@ -293,7 +297,10 @@ function(QT@PROJECT_VERSION_MAJOR@_PROCESS_RESOURCE target resourceName) add_custom_command(OUTPUT "${generatedSourceCode}" COMMAND "@QT_CMAKE_EXPORT_NAMESPACE@::rcc" ARGS ${rccArgs} - DEPENDS ${resource_dependencies} ${generatedResourceFile} + DEPENDS + ${resource_dependencies} + ${generatedResourceFile} + "@QT_CMAKE_EXPORT_NAMESPACE@::rcc" COMMENT "RCC ${newResourceName}" VERBATIM) -- cgit v1.2.3 From 7e2c198e90abe66f31c09343b7b71d8dbbdc3a12 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Tue, 4 Feb 2020 16:50:30 +0100 Subject: Remove retained quick compiler resource files Remove retained file feature as the expected behavior now is for the compiled file to be retained by default. Change-Id: I5a791a182825b223eb4497970fbb1c47c70135cc Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor --- cmake/QtResource.cmake.in | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'cmake') diff --git a/cmake/QtResource.cmake.in b/cmake/QtResource.cmake.in index 84a275bc67..bef47707ea 100644 --- a/cmake/QtResource.cmake.in +++ b/cmake/QtResource.cmake.in @@ -40,13 +40,11 @@ function(__qt_quick_compiler_process_resources target resource_name) set(qml_files) set(resource_files) - set(retained_files) # scan for qml files foreach(file IN LISTS arg_FILES) # check whether this resource should not be processed by the qt quick # compiler get_source_file_property(skip_compiler_check ${file} QT_SKIP_QUICKCOMPILER) - get_source_file_property(retain_compiler_check ${file} QT_RETAIN_QUICKCOMPILER) if (skip_compiler_check) list(APPEND resource_files ${file}) continue() @@ -56,19 +54,13 @@ function(__qt_quick_compiler_process_resources target resource_name) OR ${file} MATCHES "\.mjs$" OR ${file} MATCHES "\.qml$") list(APPEND qml_files ${file}) - if (retain_compiler_check) - list(APPEND retained_files ${file}) - list(APPEND resource_files ${file}) - endif() - else() - list(APPEND resource_files ${file}) endif() + list(APPEND resource_files ${file}) endforeach() if (NOT TARGET @QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen AND qml_files) message(WARNING "QT@PROJECT_VERSION_MAJOR@_PROCESS_RESOURCE: Qml files were detected but the qmlcachgen target is not defined. Consider adding QmlTools to your find_package command.") endif() - set(retained_resource_paths) if (TARGET @QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen AND qml_files) # Enable qt quick compiler support set(qml_resource_file "${CMAKE_CURRENT_BINARY_DIR}/.rcc/${resource_name}.qrc") @@ -86,9 +78,6 @@ function(__qt_quick_compiler_process_resources target resource_name) else() set(file_resource_path "${arg_PREFIX}/${file_resource_path}") endif() - if (file IN_LIST retained_files) - list(APPEND retained_resource_paths ${file_resource_path}) - endif() file(TO_CMAKE_PATH ${file_resource_path} file_resource_path) list(APPEND file_resource_paths ${file_resource_path}) string(REGEX REPLACE "\.js$" "_js" compiled_file ${file_relative}) @@ -127,21 +116,11 @@ function(__qt_quick_compiler_process_resources target resource_name) set(resource_name_arg "${resource_name_arg}=${chained_resource_name}") endif() - if (retained_resource_paths) - set(retained_loader_list "${CMAKE_CURRENT_BINARY_DIR}/.rcc/qmlcache/${resource_name}/retained_file_list.rsp") - file(GENERATE - OUTPUT ${retained_loader_list} - CONTENT "$" - ) - set(retained_args "--retain" "@${retained_loader_list}") - endif() - add_custom_command( OUTPUT ${qmlcache_loader_file} ${QT_TOOL_PATH_SETUP_COMMAND} COMMAND @QT_CMAKE_EXPORT_NAMESPACE@::qmlcachegen - ${retained_args} --resource-name "${resource_name_arg}" -o "${qmlcache_loader_file}" "@${qmlcache_loader_list}" -- cgit v1.2.3 From e1170185e31624daafff16447a0d548ec035b29e Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 21 Jan 2020 12:45:38 +0200 Subject: qtbase: use syncqt.pl from QT_HOST_PATH Use syncqt.pl from QT_HOST_PATH if that is given, since qtbase sources might not be available and CMAKE_INSTALL_PREFIX doesn't check for sysroot. Change-Id: I165b17a5a02fd4dbb2340bf69a641b8aaab8fabd Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor --- cmake/QtBuild.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'cmake') diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 39e3f6fb27..d27d2aae46 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -791,6 +791,12 @@ function(qt_ensure_sync_qt) qt_path_join(syncqt_install_dir ${QT_INSTALL_DIR} ${INSTALL_LIBEXECDIR}) qt_copy_or_install(PROGRAMS "${SYNCQT_FROM_SOURCE}" DESTINATION "${syncqt_install_dir}") + elseif(QT_HOST_PATH) + get_filename_component(syncqt_absolute_path + "${QT_HOST_PATH}/${INSTALL_LIBEXECDIR}/syncqt.pl" + ABSOLUTE) + set(QT_SYNCQT "${syncqt_absolute_path}" CACHE FILEPATH "syncqt script") + message(STATUS "Using host syncqt found at: ${QT_SYNCQT}") else() get_filename_component(syncqt_absolute_path "${CMAKE_INSTALL_PREFIX}/${INSTALL_LIBEXECDIR}/syncqt.pl" -- cgit v1.2.3 From 0f8039140c9e32cb1643eabd4539c53f0e5c1482 Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Tue, 21 Jan 2020 11:30:00 +0200 Subject: qtbase: don't use neon flags on arm64 NEON is mandatory for aarch64 and compiler doesn't recognize -mfpu=neon commandline argument. Change-Id: I36e9c40e3fd3604d4895da0526152e90b2165770 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor --- cmake/QtCompilerOptimization.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/QtCompilerOptimization.cmake b/cmake/QtCompilerOptimization.cmake index f1ebafc009..1f50044a6f 100644 --- a/cmake/QtCompilerOptimization.cmake +++ b/cmake/QtCompilerOptimization.cmake @@ -62,7 +62,7 @@ if(GCC OR CLANG) set(QT_CFLAGS_AVX512VBMI "-mavx512vbmi") set(QT_CFLAGS_AESNI "-maes") set(QT_CFLAGS_SHANI "-msha") - if(NOT APPLE_UIKIT) + if(NOT APPLE_UIKIT AND NOT QT_64BIT) set(QT_CFLAGS_NEON "-mfpu=neon") endif() set(QT_CFLAGS_MIPS_DSP "-mdsp") -- cgit v1.2.3 From 4ddd4bf1aa4f718ab34b3251ef7dd0ffbd1d60fe Mon Sep 17 00:00:00 2001 From: Samuli Piippo Date: Thu, 23 Jan 2020 15:56:43 +0200 Subject: Add additional include path for DRM Tegra has drm.h header in include/drm instead of include/libdrm Both paths are defined in libdrm.pc, but those are not used since this cmake file searches only for xf86drm.h. Change-Id: If1e979c7d5aec520b18eed5b3fcbb5ac2e15cc62 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor --- cmake/3rdparty/kwin/FindLibdrm.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cmake') diff --git a/cmake/3rdparty/kwin/FindLibdrm.cmake b/cmake/3rdparty/kwin/FindLibdrm.cmake index 9936e07eee..10822e693a 100644 --- a/cmake/3rdparty/kwin/FindLibdrm.cmake +++ b/cmake/3rdparty/kwin/FindLibdrm.cmake @@ -105,13 +105,19 @@ if(NOT WIN32) INTERFACE_INCLUDE_DIRECTORIES "${Libdrm_INCLUDE_DIR}" INTERFACE_INCLUDE_DIRECTORIES "${Libdrm_INCLUDE_DIR}/libdrm" ) + if(EXISTS "${Libdrm_INCLUDE_DIR}/drm") + set_property(TARGET Libdrm::Libdrm APPEND PROPERTY + INTERFACE_INCLUDE_DIRECTORIES "${Libdrm_INCLUDE_DIR}/drm" + ) + endif() + endif() mark_as_advanced(Libdrm_LIBRARY Libdrm_INCLUDE_DIR) # compatibility variables set(Libdrm_LIBRARIES ${Libdrm_LIBRARY}) - set(Libdrm_INCLUDE_DIRS ${Libdrm_INCLUDE_DIR} "${Libdrm_INCLUDE_DIR}/libdrm") + set(Libdrm_INCLUDE_DIRS ${Libdrm_INCLUDE_DIR} "${Libdrm_INCLUDE_DIR}/libdrm" "${Libdrm_INCLUDE_DIR}/drm") set(Libdrm_VERSION_STRING ${Libdrm_VERSION}) else() -- cgit v1.2.3 From c5b61d2e90fde5d9f2e968f4443ca393e52393f5 Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Fri, 31 Jan 2020 22:21:09 +0100 Subject: pro2cmake: Handle QT += core-private correctly for modules If a module project (Quick) contains QT += core-private, the qmake semantics translated to CMake would mean the following: target_link_libraries(Quick PUBLIC Core) target_link_libraries(Quick PRIVATE CorePrivate) target_link_libraries(QuickPrivate INTERFACE CorePrivate) Whereas a QT_PRIVATE += core-private only means target_link_libraries(Quick PRIVATE CorePrivate) without adding any public dependencies to QuickPrivate. To achieve that, we need a few modifications to both pro2cmake and QtBuild.cmake - pro2cmake doesn't automagically add public and private dependencies to targets when encountering a private module assigned to QT. Instead it generates the logic described above by passing correct LIBRARIES, PUBLIC_LIBRARIES, and PRIVATE_MODULE_INTERFACE values. - pro2cmake doesn't do any dependency magic for non-module targets anymore, like executables, plugins, internal_modules. This means that QT assignments are now regular public dependencies. - qt_add_module and qt_extend_target now accept a new PRIVATE_MODULE_INTERFACE option. - qt_extend_target does not automagically make private modules be public dependencies on other private modules. - qt_extend_target correctly assigns PRIVATE_MODULE_INTERFACE values to Private module only. For other target types, it's a no-op. The change requires regeneration of all projects. When we fix pro2cmake and QtBuild.cmake to properly handle internal_modules (create only Private modules without creating a non-Private counter part), we will need another project regeneration to correctly assign dependencies. Change-Id: I4c21f26b3ef3b2a4ed208b58bccb65a5b7312f81 Task-number: QTBUG-81780 Reviewed-by: Leander Beernaert Reviewed-by: Alexandru Croitor --- cmake/QtBuild.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'cmake') diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index d27d2aae46..5246f533f5 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -946,7 +946,7 @@ endfunction() set(__default_private_args "SOURCES;LIBRARIES;INCLUDE_DIRECTORIES;DEFINES;DBUS_ADAPTOR_BASENAME;DBUS_ADAPTOR_FLAGS;DBUS_ADAPTOR_SOURCES;DBUS_INTERFACE_BASENAME;DBUS_INTERFACE_FLAGS;DBUS_INTERFACE_SOURCES;FEATURE_DEPENDENCIES;COMPILE_OPTIONS;LINK_OPTIONS;MOC_OPTIONS;DISABLE_AUTOGEN_TOOLS;ENABLE_AUTOGEN_TOOLS;PLUGIN_TYPES") set(__default_public_args "PUBLIC_LIBRARIES;PUBLIC_INCLUDE_DIRECTORIES;PUBLIC_DEFINES;PUBLIC_COMPILE_OPTIONS;PUBLIC_LINK_OPTIONS") - +set(__default_private_module_args "PRIVATE_MODULE_INTERFACE") option(QT_CMAKE_DEBUG_EXTEND_TARGET "Debug extend_target calls in Qt's build system" OFF) @@ -1085,7 +1085,7 @@ function(qt_extend_target target) message(FATAL_ERROR "Trying to extend non-existing target \"${target}\".") endif() qt_parse_all_arguments(arg "qt_extend_target" "HEADER_MODULE" "PRECOMPILED_HEADER" - "CONDITION;${__default_public_args};${__default_private_args};COMPILE_FLAGS;NO_PCH_SOURCES" ${ARGN}) + "CONDITION;${__default_public_args};${__default_private_args};${__default_private_module_args};COMPILE_FLAGS;NO_PCH_SOURCES" ${ARGN}) if ("x${arg_CONDITION}" STREQUAL x) set(arg_CONDITION ON) endif() @@ -1193,7 +1193,8 @@ function(qt_extend_target target) set(target_private "${target}Private") if(TARGET "${target_private}") - target_link_libraries("${target_private}" INTERFACE "${target}" "${qt_libs_private}") + target_link_libraries("${target_private}" + INTERFACE "${target}" ${arg_PRIVATE_MODULE_INTERFACE}) endif() qt_register_target_dependencies("${target}" "${arg_PUBLIC_LIBRARIES}" @@ -1533,7 +1534,7 @@ function(qt_add_module target) qt_parse_all_arguments(arg "qt_add_module" "NO_MODULE_HEADERS;STATIC;DISABLE_TOOLS_EXPORT;EXCEPTIONS;INTERNAL_MODULE;NO_SYNC_QT;NO_PRIVATE_MODULE;HEADER_MODULE;GENERATE_METATYPES" "CONFIG_MODULE_NAME;PRECOMPILED_HEADER" - "${__default_private_args};${__default_public_args};QMAKE_MODULE_CONFIG;EXTRA_CMAKE_FILES;EXTRA_CMAKE_INCLUDES;NO_PCH_SOURCES" ${ARGN}) + "${__default_private_args};${__default_public_args};${__default_private_module_args};QMAKE_MODULE_CONFIG;EXTRA_CMAKE_FILES;EXTRA_CMAKE_INCLUDES;NO_PCH_SOURCES" ${ARGN}) if(NOT DEFINED arg_CONFIG_MODULE_NAME) set(arg_CONFIG_MODULE_NAME "${module_lower}") @@ -1751,6 +1752,7 @@ function(qt_add_module target) "${deprecation_define}" PUBLIC_LIBRARIES ${arg_PUBLIC_LIBRARIES} LIBRARIES ${arg_LIBRARIES} Qt::PlatformModuleInternal + PRIVATE_MODULE_INTERFACE ${arg_PRIVATE_MODULE_INTERFACE} FEATURE_DEPENDENCIES ${arg_FEATURE_DEPENDENCIES} DBUS_ADAPTOR_SOURCES ${arg_DBUS_ADAPTOR_SOURCES} DBUS_ADAPTOR_FLAGS ${arg_DBUS_ADAPTOR_FLAGS} -- cgit v1.2.3 From 20bb59ca61e6e40e04092771d8f1116dc011f9bc Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Mon, 3 Feb 2020 16:52:18 +0100 Subject: Allow manually specification of moc.json files for metatype generation qt6_generate_meta_types_json_file() has been extended to allow the generated moc_....cpp.json files to be manually specified. This now enabled the metatype generation to be used without resorting to AUTOMOC. Additionally, Core_qobject declaration order has been temporarily moved as it otherwise does not produce the correct metatypes dependency file for Core. This will be fixed in a follow up patch. Change-Id: I3266ab3073db478458a0c1dbc8b9fbab16622a64 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor --- cmake/QtBuild.cmake | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'cmake') diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 5246f533f5..058a0fde7e 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -3335,8 +3335,9 @@ endfunction() # Complete manual moc invocation with full control. # Use AUTOMOC whenever possible. function(qt_manual_moc result) - cmake_parse_arguments(arg "" "" "FLAGS" ${ARGN}) + cmake_parse_arguments(arg "" "OUTPUT_MOC_JSON_FILES" "FLAGS" ${ARGN}) set(moc_files) + set(metatypes_json_list) foreach(infile ${arg_UNPARSED_ARGUMENTS}) qt_make_output_file("${infile}" "moc_" ".cpp" "${CMAKE_CURRENT_SOURCE_DIR}" "${CMAKE_CURRENT_BINARY_DIR}" outfile) @@ -3344,16 +3345,30 @@ function(qt_manual_moc result) set(moc_parameters_file "${outfile}_parameters$<$>:_$>") set(moc_parameters ${arg_FLAGS} -o "${outfile}" "${infile}") + + set(metatypes_byproducts) + if (arg_OUTPUT_MOC_JSON_FILES) + set(moc_json_file "${outfile}.json") + list(APPEND moc_parameters --output-json) + list(APPEND metatypes_json_list "${outfile}.json") + set(metatypes_byproducts "${outfile}.json") + endif() + string (REPLACE ";" "\n" moc_parameters "${moc_parameters}") file(GENERATE OUTPUT "${moc_parameters_file}" CONTENT "${moc_parameters}\n") - add_custom_command(OUTPUT "${outfile}" + add_custom_command(OUTPUT "${outfile}" ${metatypes_byproducts} COMMAND ${QT_CMAKE_EXPORT_NAMESPACE}::moc "@${moc_parameters_file}" DEPENDS "${infile}" ${moc_depends} ${QT_CMAKE_EXPORT_NAMESPACE}::moc WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}" VERBATIM) endforeach() set("${result}" ${moc_files} PARENT_SCOPE) + + # Register generated json files + if (arg_OUTPUT_MOC_JSON_FILES) + set(${arg_OUTPUT_MOC_JSON_FILES} "${metatypes_json_list}" PARENT_SCOPE) + endif() endfunction() -- cgit v1.2.3 From 225113d59bae389d004fac8e73e7b8cec0bcc4ea Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Wed, 5 Feb 2020 12:58:29 +0100 Subject: Fix qt_add_qml_module() for non-prefix builds Always set the installation directory for Qml modules as it is required for qt6_add_qml_module() to set the correct properties so that qml files can be copied to the right location. This patch also fixes the copy of qmldir. As it previously stood, the copied file was not complete as it is possible fore the contents to change after we exit this function. Change-Id: I974269cf0507664b005a93bf27ab19941d99f1d6 Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor --- cmake/QtBuild.cmake | 32 ++++++++++++++++++-------------- 1 file changed, 18 insertions(+), 14 deletions(-) (limited to 'cmake') diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 058a0fde7e..0b9e6386f0 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -2561,6 +2561,8 @@ function(qt_add_qml_module target) set(generate_qmltypes_arg GENERATE_QMLTYPES) endif() + qt_path_join(qml_module_install_dir ${QT_INSTALL_DIR} "${INSTALL_QMLDIR}/${arg_TARGET_PATH}") + qt6_add_qml_module(${target} ${designer_supported_arg} ${no_create_option} @@ -2577,14 +2579,16 @@ function(qt_add_qml_module target) DO_NOT_INSTALL_METADATA DO_NOT_CREATE_TARGET INSTALL_QML_FILES + INSTALL_LOCATION "${qml_module_install_dir}" DEPENDENCIES ${arg_DEPENDENCIES} RESOURCE_EXPORT "${INSTALL_CMAKE_NAMESPACE}${target}Targets" ) get_target_property(qmldir_file ${target} QT_QML_MODULE_QMLDIR_FILE) get_target_property(plugin_types ${target} QT_QML_MODULE_PLUGIN_TYPES_FILE) - qt_path_join(qml_module_install_dir ${QT_INSTALL_DIR} "${INSTALL_QMLDIR}/${arg_TARGET_PATH}") + set(files_to_install) if (EXISTS ${plugin_types}) + list(APPEND files_to_install ${plugin_types}) qt_copy_or_install(FILES ${plugin_types} DESTINATION "${qml_module_install_dir}" ) @@ -2598,21 +2602,21 @@ function(qt_add_qml_module target) endif() endif() - qt_copy_or_install( - FILES - "${qmldir_file}" - DESTINATION - "${qml_module_install_dir}" - ) - - if(QT_WILL_INSTALL) - # qmldir should also be copied to the cmake binary dir when doing - # prefix builds - file(COPY "${qmldir_file}" - DESTINATION "${QT_BUILD_DIR}/${INSTALL_QMLDIR}/${arg_TARGET_PATH}" - ) + list(APPEND files_to_install ${qmldir_file}) + if (QT_WILL_INSTALL) + install(FILES ${files_to_install} DESTINATION ${qml_module_install_dir}) endif() + set(copy_destination "${QT_BUILD_DIR}/${INSTALL_QMLDIR}/${arg_TARGET_PATH}") + foreach(file IN LISTS files_to_install) + get_filename_component(file_name "${file}" NAME) + add_custom_command(TARGET ${target} POST_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${file}" + "${copy_destination}/${file_name}" + COMMENT "Copying ${file} to ${copy_destination}" + ) + endforeach() endfunction() # Collection of qt_add_executable arguments so they can be shared across qt_add_executable -- cgit v1.2.3 From a43f2a6caa671df6c40400d14ceb4ccb97267a51 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Thu, 6 Feb 2020 10:34:48 +0100 Subject: Safeguard against multiple definition of dbus-1 target Change-Id: Ibba9ce7ce472fe2939386065087f0b07ad811c3f Reviewed-by: Alexandru Croitor Reviewed-by: Qt CMake Build Bot --- cmake/FindWrapDBus1.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'cmake') diff --git a/cmake/FindWrapDBus1.cmake b/cmake/FindWrapDBus1.cmake index c2668d6cc8..55f9757c45 100644 --- a/cmake/FindWrapDBus1.cmake +++ b/cmake/FindWrapDBus1.cmake @@ -2,6 +2,10 @@ # Work around that:-/ # See https://gitlab.freedesktop.org/dbus/dbus/issues/267 for more information +if(DBus1_FOUND OR WrapDBus1_FOUND) + return() +endif() + if(DEFINED ENV{PKG_CONFIG_DIR}) set(__qt_dbus_pcd "$ENV{PKG_CONFIG_DIR}") endif() -- cgit v1.2.3 From 2c297ac598c273d1109f1418ee4ff64357f486a6 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Wed, 5 Feb 2020 17:35:49 +0100 Subject: Load module specific extensions for QtBuildInternals This patch enables each module to load their own Qt${version}ModuleBuildInternals.cmake to expose module specific features when building Qt. These scripts are only loaded when the package QtBuildInternals has been loaded. Change-Id: Ie58dd93ddd292cf106fe7ef147151a51fd5aa2b1 Reviewed-by: Alexandru Croitor --- cmake/QtBuild.cmake | 8 ++++++++ cmake/QtModuleConfig.cmake.in | 6 ++++++ 2 files changed, 14 insertions(+) (limited to 'cmake') diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 0b9e6386f0..ddfef56fbd 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -1870,6 +1870,14 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})") "${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}Config.cmake" INSTALL_DESTINATION "${config_install_dir}" ) + + if (EXISTS "${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}${target}BuildInternals.cmake") + configure_file("${CMAKE_CURRENT_LIST_DIR}/${INSTALL_CMAKE_NAMESPACE}${target}BuildInternals.cmake" + "${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}BuildInternals.cmake" + @ONLY) + list(APPEND extra_cmake_files "${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}BuildInternals.cmake") + endif() + write_basic_package_version_file( "${config_build_dir}/${INSTALL_CMAKE_NAMESPACE}${target}ConfigVersion.cmake" VERSION ${PROJECT_VERSION} diff --git a/cmake/QtModuleConfig.cmake.in b/cmake/QtModuleConfig.cmake.in index 58a84fb5d5..80a2b6da58 100644 --- a/cmake/QtModuleConfig.cmake.in +++ b/cmake/QtModuleConfig.cmake.in @@ -66,3 +66,9 @@ if (@QT_MODULE_HAS_META_TYPES_FILE@) endif() endif() endif() + +# Load Module's BuildIntenals should any exist +if (@INSTALL_CMAKE_NAMESPACE@BuildInternals_DIR AND + EXISTS "${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@BuildInternals.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/@INSTALL_CMAKE_NAMESPACE@@target@BuildInternals.cmake") +endif() -- cgit v1.2.3 From cb1fbfa1a035fc0c9ed71a202bff957253b6d229 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Thu, 6 Feb 2020 11:36:12 +0100 Subject: Remove qt_add_qml_module() from QtBuild This bit is being move to QtDeclarative as it is not required to build QtBase. Change-Id: I7b559b8b0e33e66d92c97c93bc43b650e7150237 Reviewed-by: Alexandru Croitor --- cmake/QtBuild.cmake | 169 ---------------------------------------------------- 1 file changed, 169 deletions(-) (limited to 'cmake') diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index ddfef56fbd..c195ed9b44 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -2462,171 +2462,6 @@ function(qt_add_resource target resourceName) endfunction() - -# This function creates a CMake target for qml modules. It will also make -# sure that if no C++ source are present, that qml files show up in the project -# in an IDE. Finally, it will also create a custom ${target}_qmltypes which -# can be used to generate the respective plugin.qmltypes file. -# -# CPP_PLUGIN: Whether this qml module has any c++ source files. -# URI: Module's uri. -# TARGET_PATH: Expected installation path for the Qml Module. Equivalent -# to the module's URI where '.' is replaced with '/'. Use this to override the -# default substitution pattern. -# VERSION: Version of the qml module -# QML_PLUGINDUMP_DEPENDENCIES: Path to a dependencies.json file to be consumed -# with the ${target}_qmltypes target (optional) -# SKIP_TYPE_REGISTRATION: All qml files are expected to be registered by the -# c++ plugin code. -# -function(qt_add_qml_module target) - - set(qml_module_optional_args - GENERATE_QMLTYPES - DESIGNER_SUPPORTED - DO_NOT_INSTALL - SKIP_TYPE_REGISTRATION - ) - - set(qml_module_single_args - URI - TARGET_PATH - VERSION - QML_PLUGINDUMP_DEPENDENCIES - CLASSNAME - ) - - set(qml_module_multi_args - IMPORTS - TYPEINFO - DEPENDENCIES - ) - - qt_parse_all_arguments(arg "qt_add_qml_module" - "${__qt_add_plugin_optional_args};${qml_module_optional_args}" - "${__qt_add_plugin_single_args};${qml_module_single_args}" - "${__qt_add_plugin_multi_args};${qml_module_multi_args}" ${ARGN}) - - if (NOT arg_URI) - message(FATAL_ERROR "qt_add_qml_module called without specifying the module's uri. Please specify one using the URI parameter.") - endif() - - set(target_path ${arg_TARGET_PATH}) - - if (NOT arg_VERSION) - message(FATAL_ERROR "qt_add_qml_module called without specifying the module's import version. Please specify one using the VERSION parameter.") - endif() - - if (NOT arg_TARGET_PATH) - string(REPLACE "." "/" arg_TARGET_PATH ${arg_URI}) - endif() - - qt_remove_args(plugin_args - ARGS_TO_REMOVE - ${target} - ${qml_module_multi_args} - ${qml_module_single_args} - ALL_ARGS - ${__qt_add_plugin_optional_args} - ${__qt_add_plugin_single_args} - ${qml_module_single_args} - ${__qt_add_plugin_multi_args} - ${qml_module_multi_args} - ARGS - ${ARGV} - ) - - # If we have no sources, but qml files, create a custom target so the - # qml file will be visibile in an IDE. - if (arg_SOURCES) - qt_add_plugin(${target} - TYPE - qml_plugin - QML_TARGET_PATH - "${arg_TARGET_PATH}" - ${plugin_args} - ) - endif() - - - if (arg_CPP_PLUGIN) - set(no_create_option DO_NOT_CREATE_TARGET) - endif() - - if (arg_CLASSNAME) - set(classname_arg CLASSNAME ${arg_CLASSNAME}) - endif() - - if (arg_DESIGNER_SUPPORTED) - set(designer_supported_arg DESIGNER_SUPPORTED) - endif() - - if (arg_SKIP_TYPE_REGISTRATION) - set(skip_registration_arg SKIP_TYPE_REGISTRATION) - endif() - - if (arg_GENERATE_QMLTYPES) - set(generate_qmltypes_arg GENERATE_QMLTYPES) - endif() - - qt_path_join(qml_module_install_dir ${QT_INSTALL_DIR} "${INSTALL_QMLDIR}/${arg_TARGET_PATH}") - - qt6_add_qml_module(${target} - ${designer_supported_arg} - ${no_create_option} - ${skip_registration_arg} - ${classname_arg} - ${generate_qmltypes_arg} - RESOURCE_PREFIX "/qt-project.org/imports" - TARGET_PATH ${arg_TARGET_PATH} - URI ${arg_URI} - VERSION ${arg_VERSION} - QML_FILES ${arg_QML_FILES} - IMPORTS "${arg_IMPORTS}" - TYPEINFO "${arg_TYPEINFO}" - DO_NOT_INSTALL_METADATA - DO_NOT_CREATE_TARGET - INSTALL_QML_FILES - INSTALL_LOCATION "${qml_module_install_dir}" - DEPENDENCIES ${arg_DEPENDENCIES} - RESOURCE_EXPORT "${INSTALL_CMAKE_NAMESPACE}${target}Targets" - ) - - get_target_property(qmldir_file ${target} QT_QML_MODULE_QMLDIR_FILE) - get_target_property(plugin_types ${target} QT_QML_MODULE_PLUGIN_TYPES_FILE) - set(files_to_install) - if (EXISTS ${plugin_types}) - list(APPEND files_to_install ${plugin_types}) - qt_copy_or_install(FILES ${plugin_types} - DESTINATION "${qml_module_install_dir}" - ) - - if(QT_WILL_INSTALL) - # plugin.qmltypes when present should also be copied to the - # cmake binary dir when doing prefix builds - file(COPY ${plugin_types} - DESTINATION "${QT_BUILD_DIR}/${INSTALL_QMLDIR}/${arg_TARGET_PATH}" - ) - endif() - endif() - - list(APPEND files_to_install ${qmldir_file}) - if (QT_WILL_INSTALL) - install(FILES ${files_to_install} DESTINATION ${qml_module_install_dir}) - endif() - - set(copy_destination "${QT_BUILD_DIR}/${INSTALL_QMLDIR}/${arg_TARGET_PATH}") - foreach(file IN LISTS files_to_install) - get_filename_component(file_name "${file}" NAME) - add_custom_command(TARGET ${target} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different - "${file}" - "${copy_destination}/${file_name}" - COMMENT "Copying ${file} to ${copy_destination}" - ) - endforeach() -endfunction() - # Collection of qt_add_executable arguments so they can be shared across qt_add_executable # and qt_add_test_helper. set(__qt_add_executable_optional_args @@ -4088,10 +3923,6 @@ function(add_qt_resource) qt_add_resource(${ARGV}) endfunction() -function(add_qml_module) - qt_add_qml_module(${ARGV}) -endfunction() - function(add_cmake_library) qt_add_cmake_library(${ARGV}) endfunction() -- cgit v1.2.3 From b06f08646013bf3042fa86aa2343447ca8b57cef Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Thu, 6 Feb 2020 13:04:45 +0100 Subject: Don't add private module headers for private modules when not needed If a module has the NO_MODULE_HEADERS option, we should not add the private module header paths to the BUILD_INTERFACE of private modules. This fixes building static non-prefix qtdeclarative builds on Linux, where non-existent QtXcbQpa headers failed the qtdeclarative generation step. Change-Id: Ic9fdd8c5688d3449576eb8a5dd852c252e29bf5b Reviewed-by: Leander Beernaert Reviewed-by: Qt CMake Build Bot Reviewed-by: Alexandru Croitor --- cmake/QtBuild.cmake | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'cmake') diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index c195ed9b44..85f53fc971 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -1949,12 +1949,13 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})") # Handle cases like QmlDevTools which do not have their own headers, but rather borrow them # from another module. if(NOT arg_NO_SYNC_QT) - list(APPEND interface_includes - "$" - "$" - "$") + list(APPEND interface_includes "$") if(NOT arg_NO_MODULE_HEADERS) + list(APPEND interface_includes + "$" + "$") + if(is_framework) set(fw_headers_dir "${INSTALL_LIBDIR}/${module}.framework/Headers/") -- cgit v1.2.3 From c431e2d33c2b13dee8b43a08c267c20ec1ae9654 Mon Sep 17 00:00:00 2001 From: Leander Beernaert Date: Fri, 7 Feb 2020 14:12:27 +0100 Subject: Refactor Metatypes dependency propagation Every metatypes.json files is now added as an INTERFACE source file to a target. This enables us later to correctly collect all the metatypes.json files from dependent targets. This information is also correctly exported via export()/install(). To avoid the metatypes.json appearing in every target's source list, the file path is wrapped in a generator expression which will only be evaluated when the consuming target has the property QT_CONSUMES_METATYPES set to true. At the moment this is limited to targets which need to interact with qmltyperegistrar. Change-Id: I0ffebcd069a923383f7ed11cde2c94ecf2fb13f3 Reviewed-by: Alexandru Croitor --- cmake/QtBuild.cmake | 2 -- cmake/QtModuleConfig.cmake.in | 21 --------------------- 2 files changed, 23 deletions(-) (limited to 'cmake') diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 85f53fc971..25756c89d9 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -1862,8 +1862,6 @@ set(QT_CMAKE_EXPORT_NAMESPACE ${QT_CMAKE_EXPORT_NAMESPACE})") set(args INSTALL_DIR "${metatypes_install_dir}") endif() qt6_generate_meta_types_json_file(${target} ${args}) - get_target_property(QT_MODULE_META_TYPES_FILE ${target} INTERFACE_QT_META_TYPES_INSTALL_FILE) - get_target_property(QT_MODULE_META_TYPES_DEP_FILE ${target} INTERFACE_QT_META_TYPES_INSTALL_DEP_FILE) endif() configure_package_config_file( "${QT_CMAKE_DIR}/QtModuleConfig.cmake.in" diff --git a/cmake/QtModuleConfig.cmake.in b/cmake/QtModuleConfig.cmake.in index 80a2b6da58..b2e1511870 100644 --- a/cmake/QtModuleConfig.cmake.in +++ b/cmake/QtModuleConfig.cmake.in @@ -45,27 +45,6 @@ if(NOT _qt_module_target_type STREQUAL "INTERFACE_LIBRARY") endif() endif() -# Apply meta types properties -if (@QT_MODULE_HAS_META_TYPES_FILE@) - if (NOT QT_NO_CREATE_TARGETS) - set_target_properties("@INSTALL_CMAKE_NAMESPACE@::@target@" PROPERTIES - INTERFACE_QT_MODULE_HAS_META_TYPES TRUE - INTERFACE_QT_META_TYPES_INSTALL_FILE "@QT_MODULE_META_TYPES_FILE@" - INTERFACE_QT_META_TYPES_INSTALL_DEP_FILE "@QT_MODULE_META_TYPES_DEP_FILE@" - ) - endif() - - if (NOT QT_NO_CREATE_VERSIONLESS_TARGETS) - get_target_property(is_alias_target "Qt::@target@" ALIASED_TARGET) - if (NOT is_alias_target) - set_target_properties("Qt::@target@" PROPERTIES - INTERFACE_QT_MODULE_HAS_META_TYPES TRUE - INTERFACE_QT_META_TYPES_INSTALL_FILE "@QT_MODULE_META_TYPES_FILE@" - INTERFACE_QT_META_TYPES_INSTALL_DEP_FILE "@QT_MODULE_META_TYPES_DEP_FILE@" - ) - endif() - endif() -endif() # Load Module's BuildIntenals should any exist if (@INSTALL_CMAKE_NAMESPACE@BuildInternals_DIR AND -- cgit v1.2.3