mirror of
git://code.qt.io/qt/qt5.git
synced 2026-03-18 02:06:20 +08:00
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>
This commit is contained in:
@@ -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}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user