From 68a1c7d38f3347e7ab58f619d89d2d32107d928e Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Mon, 2 Jan 2012 22:28:51 +0000 Subject: [PATCH] Be a little smarter about choosing the default SDK to use. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- build/tools/build-wxwidgets.py | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/build/tools/build-wxwidgets.py b/build/tools/build-wxwidgets.py index a3d370d20a..68f8351252 100755 --- a/build/tools/build-wxwidgets.py +++ b/build/tools/build-wxwidgets.py @@ -260,13 +260,20 @@ def main(scriptName, args): # developer. TODO: there should be a command line option to set # the SDK... if sys.platform.startswith("darwin"): + sdks = [ + "/Developer/SDKs/MacOSX10.5.sdk", + "/Developer/SDKs/MacOSX10.6.sdk", + "/Developer/SDKs/MacOSX10.7.sdk", + ] if not options.osx_cocoa: - wxpy_configure_opts.append( - "--with-macosx-sdk=/Developer/SDKs/MacOSX10.4u.sdk") - else: - wxpy_configure_opts.append( - "--with-macosx-sdk=/Developer/SDKs/MacOSX10.5.sdk") - + sdks.insert(0, "/Developer/SDKs/MacOSX10.4u.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 if not options.mac_framework: if installDir and not prefixDir: -- 2.50.0