Skip to content

Commit 5f15384

Browse files
committed
Problem: Only the JNI c library is included in the jar
Solution: Copy all other c dependencies to root dir and include them in the jar as well.
1 parent c3d4163 commit 5f15384

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

zproject_java.gsl

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,17 @@ task initCMake(type: Exec, dependsOn: 'generateJniHeaders') {
181181
task buildNative(type: Exec, dependsOn: 'initCMake') {
182182
commandLine "make"
183183
}
184+
185+
task copyLibs(type: Copy) {
186+
from "/usr/lib/$(project.libname).so", "/usr/local/lib/$(project.libname).so", "/tmp/lib/$(project.libname).so",
187+
. for project.use
188+
"/usr/lib/$(use.libname).so", "/usr/local/lib/$(use.libname).so", "/tmp/lib/$(use.libname).so"$(last ()?? ""? ",")
189+
. endfor
190+
into "."
191+
}
192+
184193
jar.dependsOn buildNative
194+
jar.dependsOn copyLibs
185195
test.dependsOn buildNative
186196

187197
jar {

0 commit comments

Comments
 (0)