aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-03-16 16:18:44 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-03-30 13:19:56 +0100
commitc746f27e17d255e197e68b6d65c509865d3b9108 (patch)
tree82de97bb6bb0257bf39431c92e54758810718cff /CMakeLists.txt
parent15e37e994d89aae1a8e35d59af7c9f1fe2d099ef (diff)
cmake: Allow specifying list of submodules using environment
The variable now has a QT prefix to make it less likely to clash with other environment variables. For simplicity we use the same variable name internally. Change-Id: I4c8b1a43ae1facc2e33ae3cd21a8f6b43a437a9b Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt14
1 files changed, 9 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index eb092c7d..8e894cb2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -38,15 +38,19 @@ endif()
set(QT_SUPERBUILD TRUE)
# Get submodule list if not already defined
-if (NOT BUILD_SUBMODULES)
- qt_internal_find_modules(BUILD_SUBMODULES)
+if(NOT QT_BUILD_SUBMODULES)
+ if(DEFINED ENV{QT_BUILD_SUBMODULES})
+ set(QT_BUILD_SUBMODULES "$ENV{QT_BUILD_SUBMODULES}")
+ else()
+ qt_internal_find_modules(QT_BUILD_SUBMODULES)
+ endif()
endif()
set(qt_module_dependency_map_prefix "__qt_module_dependencies_")
-qt_internal_sort_module_dependencies("${BUILD_SUBMODULES}" BUILD_SUBMODULES
+qt_internal_sort_module_dependencies("${QT_BUILD_SUBMODULES}" QT_BUILD_SUBMODULES
"${qt_module_dependency_map_prefix}")
-foreach(module IN LISTS BUILD_SUBMODULES)
+foreach(module IN LISTS QT_BUILD_SUBMODULES)
# Check for unmet dependencies
if(NOT DEFINED BUILD_${module} OR BUILD_${module})
message(NOTICE "Checking dependencies of '${module}'")
@@ -83,7 +87,7 @@ foreach(module IN LISTS BUILD_SUBMODULES)
endif()
endforeach()
-foreach(module IN LISTS BUILD_SUBMODULES)
+foreach(module IN LISTS QT_BUILD_SUBMODULES)
message(NOTICE "Configuring '${module}'")
ecm_optional_add_subdirectory("${module}")