summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cmake/QtProcessConfigureArgs.cmake16
1 files changed, 16 insertions, 0 deletions
diff --git a/cmake/QtProcessConfigureArgs.cmake b/cmake/QtProcessConfigureArgs.cmake
index 9a205a55598..4f24d635e55 100644
--- a/cmake/QtProcessConfigureArgs.cmake
+++ b/cmake/QtProcessConfigureArgs.cmake
@@ -32,6 +32,7 @@ list(TRANSFORM configure_args STRIP)
unset(generator)
set(auto_detect_generator TRUE)
unset(build_configs)
+unset(device_options)
while(configure_args)
list(POP_FRONT configure_args arg)
if(arg STREQUAL "-cmake")
@@ -121,6 +122,15 @@ while(configure_args)
elseif(arg MATCHES "^-(no-)?framework")
calculate_state()
push("-DFEATURE_framework=${state}")
+ elseif(arg MATCHES "^-x?platform$")
+ list(POP_FRONT configure_args mkspec)
+ push("-DQT_QMAKE_TARGET_MKSPEC=${mkspec}")
+ elseif(arg STREQUAL "-device")
+ list(POP_FRONT configure_args mkspec)
+ push("-DQT_QMAKE_TARGET_MKSPEC=devices/${mkspec}")
+ elseif(arg STREQUAL "-device-option")
+ list(POP_FRONT configure_args opt)
+ list(APPEND device_options "${opt}")
elseif(arg STREQUAL "--")
# Everything after this argument will be passed to CMake verbatim.
push(${configure_args})
@@ -145,6 +155,12 @@ elseif(nr_of_build_configs GREATER 1)
list(APPEND cmake_args "-DCMAKE_CONFIGURATION_TYPES=${escaped_build_configs}")
endif()
+if(device_options)
+ unset(escaped_device_options)
+ list(JOIN device_options "\\;" escaped_device_options)
+ list(APPEND cmake_args "-DQT_QMAKE_DEVICE_OPTIONS=${escaped_device_options}")
+endif()
+
if(NOT generator AND auto_detect_generator)
find_program(ninja ninja)
if(ninja)