Fix a bug in detecting system

Since QtAutoDetect is called before the project, we still don't have
access to our IOS, WATCHOS, TVOS variables, and we must use
CMAKE_SYSTEM_NAME variable instead.

Change-Id: I61afe216baec85b3fcd489957f4b6774134f8078
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 626ebf4738ca0df93d0b9e5ccdb305cb1dfa0839)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
Amir Masoud Abdol 2022-10-26 17:03:28 +02:00
parent 7d372f6e7a
commit b6eabe613f

View File

@ -269,7 +269,7 @@ endfunction()
function(qt_internal_get_darwin_sdk_version out_var)
if(APPLE)
if(IOS)
if(CMAKE_SYSTEM_NAME STREQUAL iOS)
set(sdk_name "iphoneos")
else()
# Default to macOS