]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: src: build libvirt_storage_backend_disk.so shared module
authorPavel Hrdina <phrdina@redhat.com>
Mon, 22 Jun 2020 14:14:03 +0000 (16:14 +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 cc2d1743f83d2f6b389508c8af1306b8d9513138..4c60bc7bd2fdf87f6d2101d700120a01288e6224 100644 (file)
@@ -1,10 +1,5 @@
 # vim: filetype=automake
 
-STORAGE_DRIVER_DISK_SOURCES = \
-       storage/storage_backend_disk.h \
-       storage/storage_backend_disk.c \
-       $(NULL)
-
 STORAGE_DRIVER_RBD_SOURCES = \
        storage/storage_backend_rbd.h \
        storage/storage_backend_rbd.c \
@@ -128,21 +123,6 @@ storage/test_virtstoraged.aug: remote/test_libvirtd.aug.in \
 
 endif WITH_STORAGE
 
-if WITH_STORAGE_DISK
-libvirt_storage_backend_disk_la_SOURCES = $(STORAGE_DRIVER_DISK_SOURCES)
-libvirt_storage_backend_disk_la_CFLAGS = \
-       -I$(srcdir)/conf \
-       $(AM_CFLAGS) \
-       $(NULL)
-
-storagebackend_LTLIBRARIES += libvirt_storage_backend_disk.la
-libvirt_storage_backend_disk_la_LDFLAGS = $(AM_LDFLAGS_MOD)
-libvirt_storage_backend_disk_la_LIBADD = \
-       libvirt.la \
-       $(GLIB_LIBS) \
-       $(NULL)
-endif WITH_STORAGE_DISK
-
 if WITH_STORAGE_RBD
 libvirt_storage_backend_rbd_la_SOURCES = $(STORAGE_DRIVER_RBD_SOURCES)
 libvirt_storage_backend_rbd_la_LIBADD = \
index 67b4fd4281f8fe68654240bff414f7f9db0493d7..8087bd45648d317b9cda7be0993817ee8c21bc70 100644 (file)
@@ -16,6 +16,10 @@ stoarge_file_fs_sources = [
   'storage_file_fs.c',
 ]
 
+storage_backend_disk_sources = [
+  'storage_backend_disk.c',
+]
+
 storage_backend_iscsi_sources = [
   'storage_backend_iscsi.c',
 ]
@@ -83,6 +87,16 @@ if conf.has('WITH_STORAGE')
   }
 endif
 
+if conf.has('WITH_STORAGE_DISK')
+  virt_modules += {
+    'name': 'virt_storage_backend_disk',
+    'sources': [
+      files(storage_backend_disk_sources),
+    ],
+    'install_dir': storage_backend_install_dir,
+  }
+endif
+
 if conf.has('WITH_STORAGE_ISCSI')
   virt_modules += {
     'name': 'virt_storage_backend_iscsi',