summaryrefslogtreecommitdiffstats
path: root/cmake/QtAutoDetect.cmake
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-10-08 19:32:16 +0200
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-10-12 13:35:57 +0200
commit5b90b650a414c8088854e7ca84663aaa0f3528af (patch)
tree2ea74777201c2b163be50da3bb160a4336c9866e /cmake/QtAutoDetect.cmake
parente57ccd45cad98bd92638937de1218c5a7b9f7baa (diff)
CMake: Implement missing iOS-related configure options
Detect an iOS build when either an -sdk option is passed or when -xplatform macx-ios-clang is passed as a target mkspec. Now that CMake 3.17 is released, change the default behavior of the iOS build to configure with simulator_and_device set to ON, like it is with qmake. Update the documentation regarding iOS configuration. Change-Id: I91aaf706610b8d3c69f1ad4ba9dadee2b1e5db97 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Diffstat (limited to 'cmake/QtAutoDetect.cmake')
-rw-r--r--cmake/QtAutoDetect.cmake10
1 files changed, 3 insertions, 7 deletions
diff --git a/cmake/QtAutoDetect.cmake b/cmake/QtAutoDetect.cmake
index 5a575d2de3..cd5b3406cf 100644
--- a/cmake/QtAutoDetect.cmake
+++ b/cmake/QtAutoDetect.cmake
@@ -69,14 +69,10 @@ function(qt_auto_detect_ios)
# If the variable is explicitly provided, assume simulator_and_device to be off.
if(QT_UIKIT_SDK)
set(simulator_and_device OFF)
- elseif(QT_FORCE_SIMULATOR_AND_DEVICE)
- # TODO: Once we get simulator_and_device support in upstream CMake, only then allow
- # usage of simulator_and_device without forcing.
- set(simulator_and_device ON)
else()
- # If QT_UIKIT_SDK is not provided, default to simulator.
- set(simulator_and_device OFF)
- set(QT_UIKIT_SDK "iphonesimulator" CACHE "STRING" "Chosen uikit SDK.")
+ # Default to simulator_and_device when an explicit sdk is not requested.
+ # Requires CMake 3.17.0+.
+ set(simulator_and_device ON)
endif()
message(STATUS "simulator_and_device set to: \"${simulator_and_device}\".")