- 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")
-
+ xcodePath = getXcodePath()
+ sdks = [
+ xcodePath+"/SDKs/MacOSX10.5.sdk",
+ xcodePath+"/SDKs/MacOSX10.6.sdk",
+ xcodePath+"/SDKs/MacOSX10.7.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