summaryrefslogtreecommitdiffstats
path: root/cmake/QtPostProcess.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2019-08-20 15:24:14 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2019-08-23 09:25:37 +0000
commitbb2d1f81190025b12d9c866831d8a9c21635c535 (patch)
tree3b15013a723960749236fff84a8e8c9b28485e08 /cmake/QtPostProcess.cmake
parent3d1c6b76e7d179e6c85d332baa1cc19c9dd13341 (diff)
Abstract and fix usages of QT_KNOWN_MODULES
In some places of the build system we need to iterate over repo specific Qt known modules (aka the ones that are built in the current project). In other places we need to iterate over the whole list of known Qt modules (those found via find_package + the ones built in the current project). Introduce two separate functions that provide access to either the former or latter, and adjust all existing usages of QT_KNOWN_MODULES as needed. Change-Id: Ica96d0cfe690b9aaaa3f8c53bc84975bccad69c7 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io> Reviewed-by: Qt CMake Build Bot Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Diffstat (limited to 'cmake/QtPostProcess.cmake')
-rw-r--r--cmake/QtPostProcess.cmake20
1 files changed, 13 insertions, 7 deletions
diff --git a/cmake/QtPostProcess.cmake b/cmake/QtPostProcess.cmake
index d0f370775f..571b71238c 100644
--- a/cmake/QtPostProcess.cmake
+++ b/cmake/QtPostProcess.cmake
@@ -71,6 +71,7 @@ function(qt_internal_create_module_depends_file target)
set(tool_deps_seen "")
set(main_module_tool_deps "")
+ qt_internal_get_qt_all_known_modules(known_modules)
foreach (dep ${depends})
# Normalize module by stripping leading "Qt::" and trailing "Private"
if (dep MATCHES "Qt::(.*)")
@@ -80,7 +81,7 @@ function(qt_internal_create_module_depends_file target)
set(dep "${CMAKE_MATCH_1}")
endif()
- list(FIND QT_KNOWN_MODULES "${dep}" _pos)
+ list(FIND known_modules "${dep}" _pos)
if (_pos GREATER -1)
list(APPEND qtdeps "${dep}")
@@ -224,12 +225,14 @@ endfunction()
# Create Depends.cmake & Depends.h files for all modules and plug-ins.
function(qt_internal_create_depends_files)
- message("Generating depends files for ${QT_KNOWN_MODULES}...")
- foreach (target ${QT_KNOWN_MODULES})
+ qt_internal_get_qt_repo_known_modules(repo_known_modules)
+
+ message("Generating ModuleDepends files and CMake ModuleDependencies files for ${repo_known_modules}...")
+ foreach (target ${repo_known_modules})
qt_internal_create_module_depends_file(${target})
endforeach()
- message("Generating depends files for ${QT_KNOWN_PLUGINS}...")
+ message("Generating CMake PluginDependencies files for ${QT_KNOWN_PLUGINS}...")
foreach (target ${QT_KNOWN_PLUGINS})
qt_internal_create_plugin_depends_file(${target})
endforeach()
@@ -238,8 +241,10 @@ endfunction()
# This function creates the Qt<Module>Plugins.cmake used to list all
# the plug-in target files.
function(qt_internal_create_plugins_files)
- message("Generating Plugins files for ${QT_KNOWN_MODULES}...")
- foreach (QT_MODULE ${QT_KNOWN_MODULES})
+ qt_internal_get_qt_repo_known_modules(repo_known_modules)
+
+ message("Generating Plugins files for ${repo_known_modules}...")
+ foreach (QT_MODULE ${repo_known_modules})
qt_path_join(config_build_dir ${QT_CONFIG_BUILD_DIR} ${INSTALL_CMAKE_NAMESPACE}${QT_MODULE})
qt_path_join(config_install_dir ${QT_CONFIG_INSTALL_DIR} ${INSTALL_CMAKE_NAMESPACE}${QT_MODULE})
set(QT_MODULE_PLUGIN_INCLUDES "")
@@ -285,7 +290,8 @@ endfunction()
# For every Qt module check if there any android dependencies that require
# processing.
function(qt_modules_process_android_dependencies)
- foreach (target ${QT_KNOWN_MODULES})
+ qt_internal_get_qt_repo_known_modules(repo_known_modules)
+ foreach (target ${repo_known_modules})
qt_android_dependencies(${target})
endforeach()
endfunction()