meson: Still build libshared even if libmount is disabled

Currently, if the libmount feature is disabled, we don't build
libshared and as a result skip building every other executable as
well. Among other things, this makes our nodeps CI builds kind of
pointless since hardly any code will be compiled.

Let's improve on the situation by making libmount properly optional
in libshared. Then, we only skip building the executables that
actually need libmount.
This commit is contained in:
Daan De Meyer
2025-11-24 10:57:58 +01:00
parent e910f9bc63
commit 7336f2c748
16 changed files with 138 additions and 44 deletions

View File

@@ -108,7 +108,7 @@ endif
############################################################
test_compare_versions_sh = files('test-compare-versions.sh')
if want_tests != 'false'
if want_tests != 'false' and executables_by_name.has_key('systemd-analyze')
exe = executables_by_name.get('systemd-analyze')
test('test-compare-versions',
test_compare_versions_sh,
@@ -151,7 +151,7 @@ endif
############################################################
test_fstab_generator_sh = files('test-fstab-generator.sh')
if want_tests != 'false'
if want_tests != 'false' and executables_by_name.has_key('systemd-fstab-generator')
exe = executables_by_name.get('systemd-fstab-generator')
test('test-fstab-generator',
test_fstab_generator_sh,