]> xenbits.xensource.com Git - libvirt.git/commitdiff
meson: do not look for librbd/librados if not requested
authorPaolo Bonzini <pbonzini@redhat.com>
Thu, 24 Mar 2022 10:53:03 +0000 (11:53 +0100)
committerMichal Privoznik <mprivozn@redhat.com>
Fri, 25 Mar 2022 14:24:58 +0000 (15:24 +0100)
rbd_dep is not used if -Dstorage_rbd=disabled.  Do not bother looking for
the libraries that compose it if the rbd storage backend was not requested.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
meson.build

index 2c1d3bc64d2fdd2f3b17db399fb1f5e349a82009..eb13c7efa4c16c5b2d532212e9e939da72f6fed0 100644 (file)
@@ -1127,8 +1127,8 @@ parallels_sdk_dep = dependency('parallels-sdk', version: '>=' + parallels_sdk_ve
 pciaccess_version = '0.10.0'
 pciaccess_dep = dependency('pciaccess', version: '>=' + pciaccess_version, required: get_option('pciaccess'))
 
-rbd_dep = cc.find_library('rbd', required: false)
-rados_dep = cc.find_library('rados', required: false)
+rbd_dep = cc.find_library('rbd', required: get_option('storage_rbd'))
+rados_dep = cc.find_library('rados', required: get_option('storage_rbd'))
 if rbd_dep.found() and not cc.has_function('rbd_get_features', dependencies: rbd_dep)
   rbd_dep = dependency('', required: false)
 endif