diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-03-12 14:50:37 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-13 18:40:26 +0100 |
commit | e11c2165c54ad901fe50be89bb480920f9c2cde1 (patch) | |
tree | 24c7814380a1a138950cd6d82f5f141bb9dbd527 /mkspecs/features | |
parent | c9eb0f9b49e825500f3aace1b84e3e4b143cb98d (diff) |
Simplify how we resolve the SDK root on Mac OS
We now take advantage of the fact that xcodebuild -version allows you to
pass the key that you're interested in, to only print that single value.
This technique is used by Apple's own build scripts as well.
Change-Id: I57b8424590d4137a0e7f263a318e17ee2e0dfad4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'mkspecs/features')
-rw-r--r-- | mkspecs/features/mac/sdk.prf | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/mkspecs/features/mac/sdk.prf b/mkspecs/features/mac/sdk.prf index 287cfdecdb..260d8ec97a 100644 --- a/mkspecs/features/mac/sdk.prf +++ b/mkspecs/features/mac/sdk.prf @@ -5,13 +5,8 @@ isEmpty(QMAKE_MAC_SDK): \ contains(QMAKE_MAC_SDK, .*/.*): \ error("QMAKE_MAC_SDK can only contain short-form SDK names (eg. macosx, iphoneos)") -QMAKE_MAC_SDK_INFO = $$system("xcodebuild -sdk $$QMAKE_MAC_SDK -version 2>/dev/null", lines) -isEmpty(QMAKE_MAC_SDK_INFO): error("Could not resolve SDK \'$$QMAKE_MAC_SDK\'") - -defineReplace(qtMacSDKInfo): \ - return($$replace($$list($$find(QMAKE_MAC_SDK_INFO, ^$$1:)), ^$$1:(.*), \\1)) - -QMAKE_MAC_SDK_PATH = $$qtMacSDKInfo(Path) +QMAKE_MAC_SDK_PATH = $$system("xcodebuild -sdk $$QMAKE_MAC_SDK -version Path 2>/dev/null") +isEmpty(QMAKE_MAC_SDK_PATH): error("Could not resolve SDK path for \'$$QMAKE_MAC_SDK\'") !equals(MAKEFILE_GENERATOR, XCODE) { QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK_PATH |