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>bb10
parent
8bb93bf8ee
commit
e3b36b6542
|
|
@ -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) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue