summaryrefslogtreecommitdiffstats
path: root/src/java/com
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2011-12-18 23:10:15 +0100
committerSven Gothel <[email protected]>2011-12-18 23:10:15 +0100
commitaa4cc872d630d7de170bdc4202d072220c053325 (patch)
treedd5279629479a8f6a1909284dcf76cbc000c16d1 /src/java/com
parent791dacb29bcd6d7ed161c6bd2abf7937c7d00691 (diff)
Fix regression of commit b669435d277a10e6163034aba286ecccce013f69, which removed the lib-base-name search for OSX
Diffstat (limited to 'src/java/com')
-rwxr-xr-xsrc/java/com/jogamp/common/os/NativeLibrary.java21
1 files changed, 14 insertions, 7 deletions
diff --git a/src/java/com/jogamp/common/os/NativeLibrary.java b/src/java/com/jogamp/common/os/NativeLibrary.java
index 1770f5b..b74f30d 100755
--- a/src/java/com/jogamp/common/os/NativeLibrary.java
+++ b/src/java/com/jogamp/common/os/NativeLibrary.java
@@ -333,6 +333,13 @@ public class NativeLibrary implements DynamicLookupHelper {
});
addPaths(userDir, baseNames, paths);
+ if (!searchSystemPathFirst) {
+ // Add just the library names to use the OS's search algorithm
+ for (int i = 0; i < baseNames.length; i++) {
+ paths.add(baseNames[i]);
+ }
+ }
+
// Add probable Mac OS X-specific paths
if (Platform.OS_TYPE == Platform.OSType.MACOS) {
// Add historical location
@@ -340,12 +347,7 @@ public class NativeLibrary implements DynamicLookupHelper {
// Add current location
addPaths("/System/Library/Frameworks/" + libName + ".Framework", baseNames, paths);
}
-
- if (!searchSystemPathFirst) {
- // Add just the library names to use the OS's search algorithm
- paths.addAll(Arrays.asList(baseNames));
- }
-
+
return paths;
}
@@ -400,13 +402,18 @@ public class NativeLibrary implements DynamicLookupHelper {
}
}
- String[] res = new String[prefixes.length * suffixes.length];
+ String[] res = new String[prefixes.length * suffixes.length +
+ ( Platform.OS_TYPE == Platform.OSType.MACOS ? 1 : 0 )];
int idx = 0;
for (int i = 0; i < prefixes.length; i++) {
for (int j = 0; j < suffixes.length; j++) {
res[idx++] = prefixes[i] + libName + suffixes[j];
}
}
+ if (Platform.OS_TYPE == Platform.OSType.MACOS) {
+ // Plain library-base-name in Framework folder
+ res[idx++] = libName;
+ }
return res;
}