meson: Still build libshared even if libmount is disabled (#39871)

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 14:05:29 +01:00
committed by GitHub
21 changed files with 156 additions and 58 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,