diff options
author | Tristan Partin <tristan@partin.io> | 2023-01-10 18:55:46 (GMT) |
---|---|---|
committer | Tristan Partin <tristan@partin.io> | 2023-01-10 18:55:46 (GMT) |
commit | ab8328bc8e16c16db8103377c6738bc7cfe904d4 (patch) | |
tree | b7f9da91c236bc3da39f58c9d4864b7fbae541c0 | |
parent | 266359f7a6b8b057153d6bf054d23c48d4372fcf (diff) | |
download | lz4-ab8328bc8e16c16db8103377c6738bc7cfe904d4.zip lz4-ab8328bc8e16c16db8103377c6738bc7cfe904d4.tar.gz lz4-ab8328bc8e16c16db8103377c6738bc7cfe904d4.tar.bz2 |
Clean up generation of internal static library
No sense in relinking if the default_library indicates that a static
library was already generated.
-rw-r--r-- | contrib/meson/meson/lib/meson.build | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/contrib/meson/meson/lib/meson.build b/contrib/meson/meson/lib/meson.build index 009dfcf..4acf614 100644 --- a/contrib/meson/meson/lib/meson.build +++ b/contrib/meson/meson/lib/meson.build @@ -45,11 +45,17 @@ liblz4_dep = declare_dependency( meson.override_dependency('liblz4', liblz4_dep) if get_option('tests') or get_option('programs') or get_option('examples') or get_option('ossfuzz') - liblz4_internal = static_library( - 'lz4-internal', - objects: liblz4.extract_all_objects(recursive: true), - gnu_symbol_visibility: 'hidden' - ) + if get_option('default_library') == 'shared' + liblz4_internal = static_library( + 'lz4-internal', + objects: liblz4.extract_all_objects(recursive: true), + gnu_symbol_visibility: 'hidden' + ) + elif get_option('default_library') == 'static' + liblz4_internal = liblz4 + elif get_option('default_library') == 'both' + liblz4_internal = liblz4.get_static_lib() + endif liblz4_internal_dep = declare_dependency( link_with: liblz4_internal, |