diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake index 2a92ba6f830..b3ecefabad3 100644 --- a/cmake/QtProcessConfigureArgs.cmake +++ b/cmake/QtProcessConfigureArgs.cmake @@ -91,6 +91,11 @@ while(NOT "${configure_args}" STREQUAL "") foreach(qtrepo IN LISTS qtrepos) push("-DBUILD_${qtrepo}=OFF") endforeach() + elseif(arg STREQUAL "-submodules") + list(POP_FRONT configure_args submodules) + is_non_empty_valid_arg("${arg}" "${submodules}") + list(TRANSFORM submodules REPLACE "," "[[;]]") + push("-DQT_BUILD_SUBMODULES=${submodules}") elseif(arg STREQUAL "-qt-host-path") pop_path_argument() push("-DQT_HOST_PATH=${path}") diff --git a/cmake/configure-cmake-mapping.md b/cmake/configure-cmake-mapping.md index 7fd0efda17e..2470ff90966 100644 --- a/cmake/configure-cmake-mapping.md +++ b/cmake/configure-cmake-mapping.md @@ -96,6 +96,7 @@ The following table describes the mapping of configure options to CMake argument | -android-javac-source | -DQT_ANDROID_JAVAC_SOURCE=7 | Set the javac build source version. | | -android-javac-target | -DQT_ANDROID_JAVAC_TARGET=7 | Set the javac build target version. | | -skip ,..., | -DBUILD_=OFF | | +| -submodules ,..., | -QT_BUILD_SUBMODULES=;...; | | | -make | -DQT_BUILD_TESTS=ON | A way to turn on tools explicitly is missing. If tests/examples | | | -DQT_BUILD_EXAMPLES=ON | are enabled, you can disable their building as part of the | | | | 'all' target by also passing -DQT_BUILD_TESTS_BY_DEFAULT=OFF or | diff --git a/config_help.txt b/config_help.txt index 941602eb17c..1f849b938eb 100644 --- a/config_help.txt +++ b/config_help.txt @@ -167,6 +167,11 @@ Build environment: Component selection: + -submodules [,] ... Build the listed repositories and those they + depend on rather than all checked-out repositories. + The list should be separated with commas, e.g. + -submodules qtsvg,qtnetworkauth + [default is to build all checked out repositories] -skip [,] Exclude one or more entire repositories from the build. The list should be separated with commas. e.g. -skip qtimageformats,qtsvg