]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: src: build libvirt_storage_backend_zfs.so shared module
authorPavel Hrdina <phrdina@redhat.com>
Wed, 17 Jun 2020 23:18:12 +0000 (01:18 +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 041a9e12122f4dd5019cb73904c067813d1edf43..94a471eb0c0d19c69f0f3c7477f0a0a5cdbb1eb7 100644 (file)
@@ -1,10 +1,5 @@
 # vim: filetype=automake
 
-STORAGE_DRIVER_ZFS_SOURCES = \
-       storage/storage_backend_zfs.h \
-       storage/storage_backend_zfs.c \
-       $(NULL)
-
 STORAGE_DRIVER_VSTORAGE_SOURCES = \
        storage/storage_backend_vstorage.h \
        storage/storage_backend_vstorage.c \
@@ -100,22 +95,6 @@ storage/test_virtstoraged.aug: remote/test_libvirtd.aug.in \
 
 endif WITH_STORAGE
 
-if WITH_STORAGE_ZFS
-libvirt_storage_backend_zfs_la_SOURCES = \
-       $(STORAGE_DRIVER_ZFS_SOURCES)
-libvirt_storage_backend_zfs_la_CFLAGS = \
-       -I$(srcdir)/conf \
-       $(AM_CFLAGS) \
-       $(NULL)
-
-storagebackend_LTLIBRARIES += libvirt_storage_backend_zfs.la
-libvirt_storage_backend_zfs_la_LDFLAGS = $(AM_LDFLAGS_MOD)
-libvirt_storage_backend_zfs_la_LIBADD = \
-       libvirt.la \
-       $(GLIB_LIBS) \
-       $(NULL)
-endif WITH_STORAGE_ZFS
-
 if WITH_STORAGE_VSTORAGE
 libvirt_storage_backend_vstorage_la_SOURCES = \
        $(STORAGE_DRIVER_VSTORAGE_SOURCES)
index c97a1b86efff783141d3e802fff23b4f17883f1c..4450f1908f3b05270c9dafb55728a5cfc36cb828 100644 (file)
@@ -56,6 +56,10 @@ storage_backend_sheepdog_sources = [
   'storage_backend_sheepdog.c',
 ]
 
+storage_backend_zfs_sources = [
+  'storage_backend_zfs.c',
+]
+
 storage_backend_install_dir = libdir / 'libvirt' / 'storage-backend'
 storage_file_install_dir = libdir / 'libvirt' / 'storage-file'
 
@@ -226,3 +230,13 @@ if conf.has('WITH_STORAGE_SHEEPDOG')
     'install_dir': storage_backend_install_dir,
   }
 endif
+
+if conf.has('WITH_STORAGE_ZFS')
+  virt_modules += {
+    'name': 'virt_storage_backend_zfs',
+    'sources': [
+      files(storage_backend_zfs_sources),
+    ],
+    'install_dir': storage_backend_install_dir,
+  }
+endif