From 9ad2035a4f979a860ab59becfea24b96244a7ce6 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 10 Apr 2013 23:06:21 +0000 Subject: [PATCH] also check for the SDK in subtrees used by newer XCodes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@73807 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- build/tools/build-wxwidgets.py | 32 +++++++++++++++++--------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/build/tools/build-wxwidgets.py b/build/tools/build-wxwidgets.py index 1b246de..f04e15f 100755 --- a/build/tools/build-wxwidgets.py +++ b/build/tools/build-wxwidgets.py @@ -55,8 +55,9 @@ def numCPUs(): return 1 # Default -def getXcodePath(): - return getoutput("xcode-select -print-path") +def getXcodePaths(): + base = getoutput("xcode-select -print-path") + return [base, base+"/Platforms/MacOSX.platform/Developer"] def getVisCVersion(): @@ -288,19 +289,20 @@ def main(scriptName, args): # but other cases it is optional and is left up to the developer. # TODO: there should be a command line option to set the SDK... if sys.platform.startswith("darwin"): - xcodePath = getXcodePath() - sdks = [ - xcodePath+"/SDKs/MacOSX10.5.sdk", - xcodePath+"/SDKs/MacOSX10.6.sdk", - xcodePath+"/SDKs/MacOSX10.7.sdk", - ] + for xcodePath in getXcodePaths(): + sdks = [ + xcodePath+"/SDKs/MacOSX10.5.sdk", + xcodePath+"/SDKs/MacOSX10.6.sdk", + xcodePath+"/SDKs/MacOSX10.7.sdk", + xcodePath+"/SDKs/MacOSX10.8.sdk", + ] - # use the lowest available sdk - for sdk in sdks: - if os.path.exists(sdk): - wxpy_configure_opts.append( - "--with-macosx-sdk=%s" % sdk) - break + # use the lowest available sdk + for sdk in sdks: + if os.path.exists(sdk): + wxpy_configure_opts.append( + "--with-macosx-sdk=%s" % sdk) + break if not options.mac_framework: if installDir and not prefixDir: @@ -624,7 +626,7 @@ def main(scriptName, args): os.makedirs(packagedir) basename = os.path.basename(prefixDir.split(".")[0]) packageName = basename + "-" + getWxRelease() - packageMakerPath = getXcodePath()+"/usr/bin/packagemaker " + packageMakerPath = getXcodePaths()[0]+"/usr/bin/packagemaker " args = [] args.append("--root %s" % options.installdir) args.append("--id org.wxwidgets.%s" % basename.lower()) -- 2.7.4