Fix building java bindings on Mac OSX 10.8

* look for SDKs in their new location inside the
  application bundle of XCode
This commit is contained in:
Ville Kallioniemi 2012-10-28 14:27:00 -06:00
parent 91aead2fd3
commit a20ec372b7
1 changed files with 7 additions and 2 deletions

View File

@ -90,8 +90,12 @@ public class ArchNameTask extends Task {
if (ArchLoader.IS_DARWIN) {
//default to most recent SDK
//MacOSX10.3.9.sdk, MacOSX10.4u.sdk, MacOSX10.5.sdk,etc.
File[] sdks =
new File("/Developer/SDKs").listFiles(new FileFilter() {
String sdkRoot = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs";
if (new File(sdkRoot).exists() == false) {
sdkRoot = "/Developer/SDKs";
}
File[] sdks =
new File(sdkRoot).listFiles(new FileFilter() {
public boolean accept(File file) {
String name = file.getName();
return
@ -99,6 +103,7 @@ public class ArchNameTask extends Task {
name.endsWith(".sdk");
}
});
if (sdks != null) {
Arrays.sort(sdks);
String prop = "uni.sdk";