Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

meson: add option to control embedding of JNI path in JAR #63

Merged
merged 1 commit into from
Nov 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,21 @@ fs = import('fs')
openslide_jni_path = install_dir / fs.name(openslide_jni.full_path())

# jar
# by default, don't embed JNI library path in jar on Windows
embed_jni_path = get_option('embed_jni_path')
embed_jni_path = (
embed_jni_path.enabled() or
embed_jni_path.auto() and host_machine.system() != 'windows'
)
summary(
'Embed JNI path in JAR', embed_jni_path,
bool_yn : true
)
jar_props = configure_file(
input : 'meta/openslide.properties.in',
output : 'openslide.properties',
configuration : {
# don't embed JNI library path in jar on Windows
'jni_path': host_machine.system() == 'windows' ? '' : openslide_jni_path,
'jni_path': embed_jni_path ? openslide_jni_path : '',
}
)
manifest_extra = configure_file(
Expand Down
6 changes: 6 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
option(
'embed_jni_path',
type : 'feature',
value : 'auto',
description : 'Embed path to JNI library in JAR',
)