]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: src: build libvirt_storage_backend_rbd.so shared module
authorPavel Hrdina <phrdina@redhat.com>
Wed, 17 Jun 2020 23:17:25 +0000 (01:17 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:27:05 +0000 (09:27 +0200)
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
src/storage/Makefile.inc.am
src/storage/meson.build

index 4c60bc7bd2fdf87f6d2101d700120a01288e6224..b52a9e79e63e6ec6851cefe837e5e38d4827c1eb 100644 (file)
@@ -1,10 +1,5 @@
 # vim: filetype=automake
 
-STORAGE_DRIVER_RBD_SOURCES = \
-       storage/storage_backend_rbd.h \
-       storage/storage_backend_rbd.c \
-       $(NULL)
-
 STORAGE_DRIVER_SHEEPDOG_SOURCES = \
        storage/storage_backend_sheepdog.h \
        storage/storage_backend_sheepdog.c \
@@ -123,22 +118,6 @@ storage/test_virtstoraged.aug: remote/test_libvirtd.aug.in \
 
 endif WITH_STORAGE
 
-if WITH_STORAGE_RBD
-libvirt_storage_backend_rbd_la_SOURCES = $(STORAGE_DRIVER_RBD_SOURCES)
-libvirt_storage_backend_rbd_la_LIBADD = \
-       libvirt.la \
-       $(LIBRBD_LIBS) \
-       $(GLIB_LIBS) \
-       $(NULL)
-libvirt_storage_backend_rbd_la_CFLAGS = \
-       -I$(srcdir)/conf \
-       $(AM_CFLAGS) \
-       $(NULL)
-
-storagebackend_LTLIBRARIES += libvirt_storage_backend_rbd.la
-libvirt_storage_backend_rbd_la_LDFLAGS = $(AM_LDFLAGS_MOD)
-endif WITH_STORAGE_RBD
-
 if WITH_STORAGE_SHEEPDOG
 libvirt_storage_backend_sheepdog_la_SOURCES = \
        $(STORAGE_DRIVER_SHEEPDOG_SOURCES)
index 8087bd45648d317b9cda7be0993817ee8c21bc70..3663b530d6957a4539d24e2f7a851bd0382edf1d 100644 (file)
@@ -36,6 +36,10 @@ storage_backend_mpath_sources = [
   'storage_backend_mpath.c',
 ]
 
+storage_backend_rbd_sources = [
+  'storage_backend_rbd.c',
+]
+
 storage_backend_scsi_sources = [
   'storage_backend_scsi.c',
 ]
@@ -143,6 +147,19 @@ if conf.has('WITH_STORAGE_MPATH')
   }
 endif
 
+if conf.has('WITH_STORAGE_RBD')
+  virt_modules += {
+    'name': 'virt_storage_backend_rbd',
+    'sources': [
+      files(storage_backend_rbd_sources),
+    ],
+    'deps': [
+      rbd_dep
+    ],
+    'install_dir': storage_backend_install_dir,
+  }
+endif
+
 if conf.has('WITH_STORAGE_SCSI')
   virt_modules += {
     'name': 'virt_storage_backend_scsi',