summaryrefslogtreecommitdiffstats
path: root/cmake/QtPostProcessHelpers.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/QtPostProcessHelpers.cmake')
-rw-r--r--cmake/QtPostProcessHelpers.cmake49
1 files changed, 34 insertions, 15 deletions
diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake
index 12f5c617960..2fd2ff79478 100644
--- a/cmake/QtPostProcessHelpers.cmake
+++ b/cmake/QtPostProcessHelpers.cmake
@@ -202,12 +202,10 @@ function(qt_internal_create_module_depends_file target)
# Extra QtFooModuleTools packages to be added as dependencies to
# QtModuleDependencies.cmake. Needed for QtWaylandCompositor / QtWaylandClient.
- if(NOT is_interface_lib)
- get_target_property(extra_tools_package_dependencies "${target}"
- QT_EXTRA_TOOLS_PACKAGE_DEPENDENCIES)
- if(extra_tools_package_dependencies)
- list(APPEND main_module_tool_deps "${extra_tools_package_dependencies}")
- endif()
+ get_target_property(extra_tools_package_dependencies "${target}"
+ _qt_extra_tools_package_dependencies)
+ if(extra_tools_package_dependencies)
+ list(APPEND main_module_tool_deps "${extra_tools_package_dependencies}")
endif()
qt_internal_get_qt_all_known_modules(known_modules)
@@ -801,8 +799,15 @@ endfunction()
function(qt_create_tools_config_files)
# Create packages like Qt6CoreTools/Qt6CoreToolsConfig.cmake.
foreach(module_name ${QT_KNOWN_MODULES_WITH_TOOLS})
- qt_export_tools("${module_name}")
+ qt_export_tools(MODULE_NAME "${module_name}")
endforeach()
+
+ get_cmake_property(standalone_packages _qt_standalone_tool_packages)
+ if(standalone_packages)
+ foreach(package_name IN LISTS standalone_packages)
+ qt_export_tools(PACKAGE_BASE_NAME "${package_name}")
+ endforeach()
+ endif()
endfunction()
function(qt_internal_create_config_file_for_standalone_tests)
@@ -819,7 +824,7 @@ function(qt_internal_create_config_file_for_standalone_tests)
# standalone tests, and it can happen that Core or Gui features are not
# imported early enough, which means FindWrapPNG will try to find a system PNG library instead
# of the bundled one.
- set(modules)
+ set(modules "")
foreach(m ${QT_REPO_KNOWN_MODULES})
get_target_property(target_type "${m}" TYPE)
@@ -835,12 +840,11 @@ function(qt_internal_create_config_file_for_standalone_tests)
endif()
endforeach()
- list(JOIN modules " " QT_REPO_KNOWN_MODULES_STRING)
- string(STRIP "${QT_REPO_KNOWN_MODULES_STRING}" QT_REPO_KNOWN_MODULES_STRING)
+ get_cmake_property(tool_package_base_names _qt_standalone_tool_packages)
- # Skip generating and installing file if no modules were built. This make sure not to install
- # anything when build qtx11extras on macOS for example.
- if(NOT QT_REPO_KNOWN_MODULES_STRING)
+ # Skip generating and installing file if no modules or tools were built. This makes sure not
+ # to install anything when building qtx11extras on macOS for example.
+ if(NOT modules AND NOT tool_package_base_names)
return()
endif()
@@ -848,8 +852,23 @@ function(qt_internal_create_config_file_for_standalone_tests)
# of the current repo. This is used for standalone tests.
qt_internal_get_standalone_parts_config_file_name(tests_config_file_name)
- # Standalone tests Config files should follow the main versioning scheme.
- qt_internal_get_package_version_of_target(Platform main_qt_package_version)
+ # Substitution variables.
+ if(modules)
+ list(JOIN modules "\n " module_string)
+ set(QT_MODULE_PACKAGES " QT_MODULE_PACKAGES
+ ${module_string}")
+ endif()
+
+ if(tool_package_base_names)
+ # We only have the base package names, so we need to append Tools to each of the package
+ # names
+ set(tool_packages "${tool_package_base_names}")
+ list(TRANSFORM tool_packages APPEND Tools)
+
+ list(JOIN tool_packages "\n " tool_packages_string)
+ set(QT_TOOL_PACKAGES " QT_TOOL_PACKAGES
+ ${tool_packages_string}")
+ endif()
configure_file(
"${QT_CMAKE_DIR}/QtStandaloneTestsConfig.cmake.in"