diff options
author | Sven Gothel <[email protected]> | 2011-12-18 23:10:15 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2011-12-18 23:10:15 +0100 |
commit | aa4cc872d630d7de170bdc4202d072220c053325 (patch) | |
tree | dd5279629479a8f6a1909284dcf76cbc000c16d1 /src/java/com | |
parent | 791dacb29bcd6d7ed161c6bd2abf7937c7d00691 (diff) |
Fix regression of commit b669435d277a10e6163034aba286ecccce013f69, which removed the lib-base-name search for OSX
Diffstat (limited to 'src/java/com')
-rwxr-xr-x | src/java/com/jogamp/common/os/NativeLibrary.java | 21 |
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; } |