What is a good way to integrate various SBT tasks with native libraries (for example, those from JOGL, LWGL, or JCuda? Specifically,
Is there a recommended
Under Osx, if you have issues loading native libs in /lib/*.jnilib
during sbt test
.
[error] java.lang.UnsatisfiedLinkError: Fatal execution error, caused by no jniortools in java.library.path
You can use the following code instead of System.loadLibrary("jniortools")
.
new File("lib").listFiles().map(_.getAbsolutePath).filter(_.endsWith("jniortools.jnilib")).foreach(System.load)