cmake: Move iOS detection into qt_auto_detect_ios
We don't need to deal with the input arguments to configure. We can instead look at QT_QMAKE_TARGET_MKSPEC, like we do when we auto detect other platforms. This handles both the -xplatform and the -platform arguments. Change-Id: I8d987d23e16bfa106833d521f67e8b5a931d9169 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
70e69f334e
commit
7826a96652
@ -178,6 +178,10 @@ function(qt_auto_detect_vcpkg)
|
|||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(qt_auto_detect_ios)
|
function(qt_auto_detect_ios)
|
||||||
|
if("${QT_QMAKE_TARGET_MKSPEC}" STREQUAL "macx-ios-clang")
|
||||||
|
set(CMAKE_SYSTEM_NAME "iOS" CACHE STRING "")
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CMAKE_SYSTEM_NAME STREQUAL iOS)
|
if(CMAKE_SYSTEM_NAME STREQUAL iOS)
|
||||||
message(STATUS "Using internal CMake ${CMAKE_SYSTEM_NAME} toolchain file.")
|
message(STATUS "Using internal CMake ${CMAKE_SYSTEM_NAME} toolchain file.")
|
||||||
|
|
||||||
@ -472,9 +476,9 @@ macro(qt_internal_setup_autodetect)
|
|||||||
|
|
||||||
qt_auto_detect_cyclic_toolchain()
|
qt_auto_detect_cyclic_toolchain()
|
||||||
qt_auto_detect_cmake_config()
|
qt_auto_detect_cmake_config()
|
||||||
qt_auto_detect_darwin()
|
|
||||||
qt_auto_detect_macos_universal()
|
qt_auto_detect_macos_universal()
|
||||||
qt_auto_detect_ios()
|
qt_auto_detect_ios()
|
||||||
|
qt_auto_detect_darwin()
|
||||||
qt_auto_detect_android()
|
qt_auto_detect_android()
|
||||||
qt_auto_detect_pch()
|
qt_auto_detect_pch()
|
||||||
qt_auto_detect_wasm()
|
qt_auto_detect_wasm()
|
||||||
|
@ -926,11 +926,6 @@ translate_string_input(android-javac-target QT_ANDROID_JAVAC_TARGET)
|
|||||||
|
|
||||||
translate_string_input(sdk QT_APPLE_SDK)
|
translate_string_input(sdk QT_APPLE_SDK)
|
||||||
|
|
||||||
if((DEFINED INPUT_xplatform AND INPUT_xplatform STREQUAL "macx-ios-clang")
|
|
||||||
OR (DEFINED INPUT_platform AND INPUT_platform STREQUAL "macx-ios-clang"))
|
|
||||||
push("-DCMAKE_SYSTEM_NAME=iOS")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
drop_input(make)
|
drop_input(make)
|
||||||
drop_input(nomake)
|
drop_input(nomake)
|
||||||
translate_boolean_input(install-examples-sources QT_INSTALL_EXAMPLES_SOURCES)
|
translate_boolean_input(install-examples-sources QT_INSTALL_EXAMPLES_SOURCES)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user