]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: src: build libvirt_storage_*_gluster.so shared modules
authorPavel Hrdina <phrdina@redhat.com>
Wed, 17 Jun 2020 23:17:58 +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 ebb700eb1604760654e6c1825bb1a1c761a7a443..041a9e12122f4dd5019cb73904c067813d1edf43 100644 (file)
@@ -1,15 +1,5 @@
 # vim: filetype=automake
 
-STORAGE_DRIVER_GLUSTER_SOURCES = \
-       storage/storage_backend_gluster.h \
-       storage/storage_backend_gluster.c \
-       $(NULL)
-
-STORAGE_FILE_GLUSTER_SOURCES = \
-       storage/storage_file_gluster.h \
-       storage/storage_file_gluster.c \
-       $(NULL)
-
 STORAGE_DRIVER_ZFS_SOURCES = \
        storage/storage_backend_zfs.h \
        storage/storage_backend_zfs.c \
@@ -30,8 +20,6 @@ STATEFUL_DRIVER_SOURCE_FILES += \
 
 storagebackend_LTLIBRARIES =
 
-storagefile_LTLIBRARIES =
-
 if WITH_STORAGE
 sbin_PROGRAMS += virtstoraged
 
@@ -112,41 +100,6 @@ storage/test_virtstoraged.aug: remote/test_libvirtd.aug.in \
 
 endif WITH_STORAGE
 
-if WITH_STORAGE_GLUSTER
-libvirt_storage_backend_gluster_la_SOURCES = \
-       $(STORAGE_DRIVER_GLUSTER_SOURCES)
-libvirt_storage_backend_gluster_la_LIBADD = \
-       libvirt.la \
-       $(GLUSTERFS_LIBS) \
-       $(GLIB_LIBS) \
-       $(NULL)
-libvirt_storage_backend_gluster_la_CFLAGS = \
-       -I$(srcdir)/conf \
-       $(GLUSTERFS_CFLAGS) \
-       $(AM_CFLAGS) \
-       $(NULL)
-
-storagebackend_LTLIBRARIES += libvirt_storage_backend_gluster.la
-libvirt_storage_backend_gluster_la_LDFLAGS = $(AM_LDFLAGS_MOD)
-
-
-libvirt_storage_file_gluster_la_SOURCES = \
-       $(STORAGE_FILE_GLUSTER_SOURCES)
-libvirt_storage_file_gluster_la_LIBADD = \
-       libvirt.la \
-       $(GLUSTERFS_LIBS) \
-       $(GLIB_LIBS) \
-       $(NULL)
-libvirt_storage_file_gluster_la_CFLAGS = \
-       -I$(srcdir)/conf \
-       $(GLUSTERFS_CFLAGS) \
-       $(AM_CFLAGS) \
-       $(NULL)
-
-storagefile_LTLIBRARIES += libvirt_storage_file_gluster.la
-libvirt_storage_file_gluster_la_LDFLAGS = $(AM_LDFLAGS_MOD)
-endif WITH_STORAGE_GLUSTER
-
 if WITH_STORAGE_ZFS
 libvirt_storage_backend_zfs_la_SOURCES = \
        $(STORAGE_DRIVER_ZFS_SOURCES)
index ae36f3e829e13e9c2c7eaa638eaab529b02ea898..c97a1b86efff783141d3e802fff23b4f17883f1c 100644 (file)
@@ -20,6 +20,14 @@ storage_backend_disk_sources = [
   'storage_backend_disk.c',
 ]
 
+storage_backend_gluster_sources = [
+  'storage_backend_gluster.c',
+]
+
+storage_file_gluster_sources = [
+  'storage_file_gluster.c',
+]
+
 storage_backend_iscsi_sources = [
   'storage_backend_iscsi.c',
 ]
@@ -105,6 +113,30 @@ if conf.has('WITH_STORAGE_DISK')
   }
 endif
 
+if conf.has('WITH_STORAGE_GLUSTER')
+  virt_modules += {
+    'name': 'virt_storage_backend_gluster',
+    'sources': [
+      files(storage_backend_gluster_sources),
+    ],
+    'deps': [
+      glusterfs_dep,
+    ],
+    'install_dir': storage_backend_install_dir,
+  }
+
+  virt_modules += {
+    'name': 'virt_storage_file_gluster',
+    'sources': [
+      files(storage_file_gluster_sources),
+    ],
+    'dependenciec': [
+      glusterfs_dep,
+    ],
+    'install_dir': storage_file_install_dir,
+  }
+endif
+
 if conf.has('WITH_STORAGE_ISCSI')
   virt_modules += {
     'name': 'virt_storage_backend_iscsi',