From b6eabe613fa926cb9a5feb191a10d110bfc89ea4 Mon Sep 17 00:00:00 2001 From: Amir Masoud Abdol Date: Wed, 26 Oct 2022 17:03:28 +0200 Subject: [PATCH] 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 (cherry picked from commit 626ebf4738ca0df93d0b9e5ccdb305cb1dfa0839) Reviewed-by: Qt Cherry-pick Bot --- cmake/QtAutoDetect.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/QtAutoDetect.cmake b/cmake/QtAutoDetect.cmake index 55020d7f1ef..21c49cb64ac 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