-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
started trying to fix installation of the jni by changing the cmake t…
…o a less complex structure
- Loading branch information
1 parent
5ad8e14
commit 05cc32e
Showing
7 changed files
with
72 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
53 changes: 53 additions & 0 deletions
53
external-control/src/main/java/us/ihmc/externalControl/ExternalWrapperNativeLibrary.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package us.ihmc.externalControl; | ||
|
||
import us.ihmc.log.LogTools; | ||
import us.ihmc.tools.nativelibraries.NativeLibraryDescription; | ||
import us.ihmc.tools.nativelibraries.NativeLibraryLoader; | ||
import us.ihmc.tools.nativelibraries.NativeLibraryWithDependencies; | ||
|
||
public class ExternalWrapperNativeLibrary implements NativeLibraryDescription | ||
{ | ||
@Override | ||
public String getPackage(OperatingSystem operatingSystem, Architecture architecture) | ||
{ | ||
String architecturePackage = ""; | ||
if (architecture == Architecture.x64) | ||
{ | ||
architecturePackage = switch (operatingSystem) | ||
{ | ||
case LINUX64 -> "linux-x86_64"; | ||
default -> "unknown"; | ||
}; | ||
} | ||
|
||
return "externalWrapper." + architecturePackage; | ||
} | ||
|
||
@Override | ||
public NativeLibraryWithDependencies getLibraryWithDependencies(OperatingSystem operatingSystem, Architecture architecture) | ||
{ | ||
switch (operatingSystem) | ||
{ | ||
case LINUX64: | ||
return NativeLibraryWithDependencies.fromFilename("jniExternalWrapper.so", | ||
"libexternal-wrapper.so"); | ||
default: | ||
break; | ||
} | ||
|
||
LogTools.warn("Unsupported platform: " + operatingSystem.name() + "-" + architecture.name()); | ||
return null; | ||
} | ||
|
||
private static boolean loaded = false; | ||
|
||
public static boolean load() | ||
{ | ||
if (!loaded) | ||
{ | ||
ExternalWrapperNativeLibrary nativeLibrary = new ExternalWrapperNativeLibrary(); | ||
loaded = NativeLibraryLoader.loadLibrary(nativeLibrary); | ||
} | ||
return loaded; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
external-control/src/main/resources/externalControl/linux-x86_64/libexternal-wrapper.so
Git LFS file not shown