qt5base-lts/mkspecs/macx-ios-clang/features/sdk.prf
Tor Arne Vestbø d5e56fd913 Xcode: Make QMAKE_MAC_SDK_(PLATFORM_)PATH depend on active SDK
The Xcode project generator doesn't support exclusive builds, and always
runs as the default debug/release config, and with iPhoneOS as the target
platform. This means we need to parameterize the QMAKE_MAC_SDK_* build
settings to depend on the currently active SDK in Xcode, so that the
paths, when used in eg. linker flags, are up to date.

Change-Id: I9ca10f794e14ab440d98820657758b3fd8a7cdb0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2015-03-07 01:57:48 +00:00

34 lines
1.5 KiB
Plaintext

# In case the user sets the SDK manually
contains(QMAKE_MAC_SDK, ^iphonesimulator.*) {
iphonesimulator_and_iphoneos: \
error("iOS simulator is handled automatically for iphonesimulator_and_iphoneos")
CONFIG += iphonesimulator
}
iphonesimulator_and_iphoneos:iphonesimulator: \
QMAKE_MAC_SDK ~= s,^iphoneos,iphonesimulator,
load(sdk)
lessThan(QMAKE_MAC_SDK_VERSION, "8.0"): \
error("Current $$QMAKE_MAC_SDK SDK version ($$QMAKE_MAC_SDK_VERSION) is too old. Please upgrade Xcode.")
macx-xcode {
sdk_path_iphoneos.name = "QMAKE_MAC_SDK_PATH[sdk=iphoneos*]"
sdk_path_iphoneos.value = $$QMAKE_MAC_SDK_PATH
QMAKE_MAC_SDK_PATH ~= s,iPhoneOS,iPhoneSimulator,
sdk_path_iphonesimulator.name = "QMAKE_MAC_SDK_PATH[sdk=iphonesimulator*]"
sdk_path_iphonesimulator.value = $$QMAKE_MAC_SDK_PATH
QMAKE_MAC_XCODE_SETTINGS += sdk_path_iphoneos sdk_path_iphonesimulator
QMAKE_MAC_SDK_PATH = "$(QMAKE_MAC_SDK_PATH)"
sdk_platform_path_iphoneos.name = "QMAKE_MAC_SDK_PLATFORM_PATH[sdk=iphoneos*]"
sdk_platform_path_iphoneos.value = $$QMAKE_MAC_SDK_PLATFORM_PATH
QMAKE_MAC_SDK_PLATFORM_PATH ~= s,iPhoneOS,iPhoneSimulator,
sdk_platform_path_iphonesimulator.name = "QMAKE_MAC_SDK_PLATFORM_PATH[sdk=iphonesimulator*]"
sdk_platform_path_iphonesimulator.value = $$QMAKE_MAC_SDK_PLATFORM_PATH
QMAKE_MAC_XCODE_SETTINGS += sdk_platform_path_iphoneos sdk_platform_path_iphonesimulator
QMAKE_MAC_SDK_PLATFORM_PATH = "$(QMAKE_MAC_SDK_PLATFORM_PATH)"
}