diff options
Diffstat (limited to 'contrib/meson/lib/meson.build')
-rw-r--r-- | contrib/meson/lib/meson.build | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/contrib/meson/lib/meson.build b/contrib/meson/lib/meson.build index 3810601..e782334 100644 --- a/contrib/meson/lib/meson.build +++ b/contrib/meson/lib/meson.build @@ -27,19 +27,23 @@ if use_debug endif liblz4_c_args += cc.get_supported_arguments(liblz4_debug_cflags) +if host_machine_os == os_windows and default_library != 'static' + liblz4_c_args += '-DLZ4_DLL_EXPORT=1' +endif + liblz4 = library('lz4', liblz4_sources, include_directories: liblz4_includes, c_args: liblz4_c_args, install: true, - soversion: lz4_libversion) + version: lz4_libversion) liblz4_dep = declare_dependency(link_with: liblz4, include_directories: liblz4_includes) -pkgconfig.generate(name: 'lz4', - filebase: 'lz4', - libraries: [liblz4], +pkgconfig.generate(liblz4, + name: 'lz4', + filebase: 'liblz4', description: 'extremely fast lossless compression algorithm library', version: lz4_libversion, url: 'http://www.lz4.org/') @@ -47,6 +51,7 @@ pkgconfig.generate(name: 'lz4', install_headers(join_paths(lz4_root_dir, 'lib/lz4.h'), join_paths(lz4_root_dir, 'lib/lz4hc.h'), join_paths(lz4_root_dir, 'lib/lz4frame.h')) -if get_option('default_library') != 'shared' + +if default_library != 'shared' install_headers(join_paths(lz4_root_dir, 'lib/lz4frame_static.h')) endif |