summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@digia.com>2015-02-13 15:19:32 +0100
committerTor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>2015-03-07 01:57:48 +0000
commitd5e56fd9135f61b05596cfdf095b301bc5cb3fef (patch)
treee5232db339f783f5674c302b2bbc1a1dec4bbad0 /mkspecs
parentf58933f2a9a4a42aca4331f6a93cf5e796728c0d (diff)
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>
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/macx-ios-clang/features/sdk.prf18
1 files changed, 18 insertions, 0 deletions
diff --git a/mkspecs/macx-ios-clang/features/sdk.prf b/mkspecs/macx-ios-clang/features/sdk.prf
index 003789b5be..32fcbb7289 100644
--- a/mkspecs/macx-ios-clang/features/sdk.prf
+++ b/mkspecs/macx-ios-clang/features/sdk.prf
@@ -13,3 +13,21 @@ 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)"
+}