From 3946e3daed02bdb07a4360a4e7344c2ec2e44193 Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Wed, 2 Nov 2022 21:18:58 -0500 Subject: Add Meson override for the library --- contrib/meson/meson/lib/meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/meson/meson/lib/meson.build b/contrib/meson/meson/lib/meson.build index f37eec2..d578bdd 100644 --- a/contrib/meson/meson/lib/meson.build +++ b/contrib/meson/meson/lib/meson.build @@ -42,6 +42,8 @@ liblz4_dep = declare_dependency( include_directories: include_directories(lz4_source_root / 'lib') ) +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', -- cgit v0.12 From 3301f3110f0f0f73819a70564276e1265eb0d83d Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Mon, 14 Nov 2022 19:43:21 -0600 Subject: Only build the freestanding test on Linux x86_64 --- contrib/meson/meson/tests/meson.build | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/contrib/meson/meson/tests/meson.build b/contrib/meson/meson/tests/meson.build index 71db2e6..df47b83 100644 --- a/contrib/meson/meson/tests/meson.build +++ b/contrib/meson/meson/tests/meson.build @@ -45,8 +45,9 @@ test_exes = { 'sources': files(lz4_source_root / 'tests/freestanding.c'), 'c_args': ['-ffreestanding', '-Wno-unused-parameter', '-Wno-declaration-after-statement'], 'link_args': ['-nostdlib'], - 'build': cc.get_id() in ['gcc', 'clang'], - 'override_options': ['optimization=1'] + 'build': cc.get_id() in ['gcc', 'clang'] and + host_machine.system() == 'linux' and host_machine.cpu_family() == 'x86_64', + 'override_options': ['optimization=1'], }, 'fullbench': { 'sources': files(lz4_source_root / 'tests/fullbench.c'), -- cgit v0.12 From 2fc9a85bf8d4f3a67f23dd8cee517d79db39f328 Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Thu, 24 Nov 2022 10:54:20 -0600 Subject: Install lz4file.h only when default_library isn't shared --- contrib/meson/meson/lib/meson.build | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/contrib/meson/meson/lib/meson.build b/contrib/meson/meson/lib/meson.build index d578bdd..009dfcf 100644 --- a/contrib/meson/meson/lib/meson.build +++ b/contrib/meson/meson/lib/meson.build @@ -75,8 +75,7 @@ install_headers( if get_option('default_library') != 'shared' install_headers(lz4_source_root / 'lib/lz4frame_static.h') -endif - -if get_option('unstable') - install_headers(lz4_source_root / 'lib/lz4file.h') + if get_option('unstable') + install_headers(lz4_source_root / 'lib/lz4file.h') + endif endif -- cgit v0.12