summaryrefslogtreecommitdiffstats
path: root/cmake/QtBaseConfigureTests.cmake
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-03-22 15:35:14 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2024-04-03 17:17:11 +0200
commite23ea6a5d3bf09921bb98150a4f0f504e77ef4a3 (patch)
tree972bad260b595781c3bbcd7eaf79c3b0cfed020c /cmake/QtBaseConfigureTests.cmake
parente3b36b65429f505522db2522798e72b334a11308 (diff)
cmake: Propagate Qt's CMAKE_OSX_SYSROOT to user projects by SDK name
CMake will transform the CMAKE_OSX_SYSROOT into a path as part of Darwin-initialize.cmake, as non-Xcode generators rely on it to be a path when setting -isysroot. When propagating the CMAKE_OSX_SYSROOT to consumers of Qt, we need to propagate it by its original SDK name, so that CMake's Xcode generator can write it by name into the SDKROOT Xcode setting by name, and so that we don't lock the user into using the exact same SDK path (and version) as we did when building Qt. The QT_APPLE_SDK code path has been removed, as setting QT_APPLE_SDK will always set the CMAKE_OSX_SYSROOT as well. Change-Id: Ib1ef19b9dc375dddf76a2629ee790990c0722f75 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake/QtBaseConfigureTests.cmake')
-rw-r--r--cmake/QtBaseConfigureTests.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/QtBaseConfigureTests.cmake b/cmake/QtBaseConfigureTests.cmake
index 4ac4f35f01..66a0b3b6dd 100644
--- a/cmake/QtBaseConfigureTests.cmake
+++ b/cmake/QtBaseConfigureTests.cmake
@@ -200,7 +200,7 @@ function(qt_internal_print_cmake_darwin_info)
set(default_osx_arch " (defaults to ${CMAKE_SYSTEM_PROCESSOR})")
endif()
message(STATUS "CMAKE_OSX_ARCHITECTURES: \"${CMAKE_OSX_ARCHITECTURES}\"${default_osx_arch}")
- message(STATUS "CMAKE_OSX_SYSROOT: \"${CMAKE_OSX_SYSROOT}\"")
+ message(STATUS "CMAKE_OSX_SYSROOT: \"$CACHE{CMAKE_OSX_SYSROOT}\" / \"${CMAKE_OSX_SYSROOT}\"")
message(STATUS "CMAKE_OSX_DEPLOYMENT_TARGET: \"${CMAKE_OSX_DEPLOYMENT_TARGET}\"")
message(STATUS "QT_MAC_SDK_VERSION: \"${QT_MAC_SDK_VERSION}\"")
message(STATUS "QT_MAC_XCODE_VERSION: \"${QT_MAC_XCODE_VERSION}\"")