summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAmir Masoud Abdol <amirmasoudabdol@icloud.com>2022-10-26 17:03:28 +0200
committerAmir Masoud Abdol <amirmasoudabdol@icloud.com>2022-10-28 11:10:16 +0200
commitb6eabe613fa926cb9a5feb191a10d110bfc89ea4 (patch)
treecde71484e2ca9e12e7be2dc414c1840a8f2e0fb9
parent7d372f6e7ab81171d7cfc44897cf66f03ba0545b (diff)
downloadqtbase-b6eabe613fa926cb9a5feb191a10d110bfc89ea4.tar.gz
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>
-rw-r--r--cmake/QtAutoDetect.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtAutoDetect.cmake b/cmake/QtAutoDetect.cmake
index 55020d7f1e..21c49cb64a 100644
--- a/cmake/QtAutoDetect.cmake
+++ b/cmake/QtAutoDetect.cmake
@@ -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