diff options
author | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2024-03-21 19:34:30 +0100 |
---|---|---|
committer | Tor Arne Vestbø <tor.arne.vestbo@qt.io> | 2024-04-03 17:17:11 +0200 |
commit | e3b36b65429f505522db2522798e72b334a11308 (patch) | |
tree | a38ff014336b959563a5354f703326ea9cde7300 | |
parent | 8bb93bf8ee59b3e31e7353d6683dbb0aa890f7e7 (diff) |
qmake: Improve Xcode projects for single SDK builds on Apple platforms
Xcode expects the base SDK to always be the device SDK, so we can't
pass QMAKE_MAC_SDK on directly.
We use the Xcode SUPPORTED_PLATFORMS setting to inform Xcode about
which targets we can actually build and run for.
Change-Id: I32f474a9f2016fb410225cfef1fecc6598ac6c82
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r-- | mkspecs/features/uikit/default_post.prf | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/mkspecs/features/uikit/default_post.prf b/mkspecs/features/uikit/default_post.prf index 0cac4c0177..a731cd0cbe 100644 --- a/mkspecs/features/uikit/default_post.prf +++ b/mkspecs/features/uikit/default_post.prf @@ -40,6 +40,18 @@ macx-xcode { } QMAKE_BUNDLE_DATA += qmake_launch_screens } + + !qtConfig(simulator_and_device) { + # Single SDK builds only support the target we built + supported_platforms.name = SUPPORTED_PLATFORMS + supported_platforms.value = $$QMAKE_MAC_SDK + QMAKE_MAC_XCODE_SETTINGS += supported_platforms + } + + # In a simulator specific build the device config will set the SDK + # to the simulator SDK, but for Xcode we always want the SDKROOT + # to be the device SDK. + QMAKE_MAC_SDK = $$device.sdk } !xcodebuild:equals(TEMPLATE, app):!isEmpty(QMAKE_INFO_PLIST) { |