[libvirt PATCH 14/26] meson: Fix disabling netcf

Andrea Bolognani abologna at redhat.com
Tue Jun 1 08:37:45 UTC 2021


If the feature is disabled, the corresponding flags should not
show up in the compiler command line.

Signed-off-by: Andrea Bolognani <abologna at redhat.com>
---
 meson.build | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meson.build b/meson.build
index 14d6ce039f..9b5de6daa1 100644
--- a/meson.build
+++ b/meson.build
@@ -1025,11 +1025,13 @@ libxml_dep = dependency('libxml-2.0', version: '>=' + libxml_version)
 libm_dep = cc.find_library('m')
 
 netcf_version = '0.1.8'
-netcf_dep = dependency('netcf', version: '>=' + netcf_version, required: get_option('netcf'))
 if not get_option('netcf').disabled()
+  netcf_dep = dependency('netcf', version: '>=' + netcf_version, required: get_option('netcf'))
   if netcf_dep.found()
     conf.set('WITH_NETCF', 1)
   endif
+else
+  netcf_dep = dependency('', required: false)
 endif
 
 have_gnu_gettext_tools = false
-- 
2.31.1




More information about the libvir-list mailing list