]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
meson: don't try to build test_ca without libcap-ng
authorThomas Weißschuh <thomas@t-8ch.de>
Wed, 11 Oct 2023 14:35:45 +0000 (16:35 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Wed, 11 Oct 2023 14:35:45 +0000 (16:35 +0200)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
meson.build

index 281bda19e0ec62f61381d44541310bba81d4211a..aaaddbe51e841acfc218ac485aa53967ae347471 100644 (file)
@@ -377,6 +377,9 @@ conf.set('HAVE_CRYPT_ACTIVATE_BY_SIGNED_KEY', have ? 1 : false)
 lib_cap_ng = dependency(
   'libcap-ng',
   required : get_option('build-setpriv'))
+if not lib_cap_ng.found()
+  lib_cap_ng = disabler()
+endif
 
 lib_selinux = dependency(
   'libselinux',
@@ -3316,7 +3319,9 @@ exe = executable(
   include_directories : includes,
   dependencies : [lib_cap_ng],
   build_by_default: program_tests)
-exes += exe
+if not is_disabler(exe)
+  exes += exe
+endif
 
 exe = executable(
   'test_mbsencode',