]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: Fix disabling netcf
authorAndrea Bolognani <abologna@redhat.com>
Thu, 27 May 2021 14:09:54 +0000 (16:09 +0200)
committerAndrea Bolognani <abologna@redhat.com>
Tue, 1 Jun 2021 12:30:39 +0000 (14:30 +0200)
If the feature is disabled, the corresponding flags should not
show up in the compiler command line.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
meson.build

index f81271598c7371d7b36895dd0447677ce3fdc215..a84396f3022ecff3cb8419161e71f8ba632c2ddf 100644 (file)
@@ -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