From e11c2165c54ad901fe50be89bb480920f9c2cde1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tor=20Arne=20Vestb=C3=B8?= Date: Tue, 12 Mar 2013 14:50:37 +0100 Subject: 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 Reviewed-by: Richard Moe Gustavsen --- mkspecs/features/mac/sdk.prf | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'mkspecs') 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 -- cgit v1.2.3