summaryrefslogtreecommitdiffstats
path: root/cmake/QtProcessConfigureArgs.cmake
diff options
context:
space:
mode:
authorJoerg Bornemann <joerg.bornemann@qt.io>2021-04-26 15:05:24 +0200
committerJoerg Bornemann <joerg.bornemann@qt.io>2021-04-26 23:11:28 +0200
commit52077d4f0193a236eacac98f75994b44a4c30a91 (patch)
tree251cf67370b9003f0ef132b594f2ebf2e53cd91d /cmake/QtProcessConfigureArgs.cmake
parent7d48b64f41083dde3dcb7fcee8cef0f4db6417f8 (diff)
Inhibit CMake generator detection for qt-configure-module
When configuring a Qt module with qt-configure-module, we want to use the same CMake generator that was used for building qtbase. That generator is encoded in qt-cmake-private. But qt-configure-module overrides the generator after trying to detect what generator should be used. That auto-detection is only useful for qtbase-builds and top-level builds. Turn it off for repo builds other than qtbase. Pick-to: 6.1 Fixes: QTBUG-91405 Change-Id: I07efb4afb51ba69d2f5467d272118fa51637ab54 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtProcessConfigureArgs.cmake')
-rw-r--r--cmake/QtProcessConfigureArgs.cmake3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake
index 8d4cef232b..0f13a6886f 100644
--- a/cmake/QtProcessConfigureArgs.cmake
+++ b/cmake/QtProcessConfigureArgs.cmake
@@ -28,8 +28,10 @@ endmacro()
if("${MODULE_ROOT}" STREQUAL "")
# If MODULE_ROOT is not set, assume that we want to build qtbase or top-level.
get_filename_component(MODULE_ROOT ".." ABSOLUTE BASE_DIR "${CMAKE_CURRENT_LIST_DIR}")
+ set(auto_detect_generator TRUE)
else()
file(TO_CMAKE_PATH "${MODULE_ROOT}" MODULE_ROOT)
+ set(auto_detect_generator FALSE)
endif()
set(configure_filename "configure.cmake")
set(commandline_filename "qt_cmdline.cmake")
@@ -54,7 +56,6 @@ list(FILTER configure_args EXCLUDE REGEX "^[ \t]*$")
list(TRANSFORM configure_args STRIP)
list(TRANSFORM configure_args REPLACE "\\\\" "\\\\\\\\")
unset(generator)
-set(auto_detect_generator TRUE)
set(auto_detect_compiler TRUE)
unset(device_options)
set_property(GLOBAL PROPERTY UNHANDLED_ARGS "")