From 626ebf4738ca0df93d0b9e5ccdb305cb1dfa0839 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. Pick-to: 6.4 Change-Id: I61afe216baec85b3fcd489957f4b6774134f8078 Reviewed-by: Alexandru Croitor --- cmake/QtAutoDetect.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/QtAutoDetect.cmake b/cmake/QtAutoDetect.cmake index 76158667210..c1ef0cc344c 100644 --- a/cmake/QtAutoDetect.cmake +++ b/cmake/QtAutoDetect.cmake @@ -274,7 +274,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