]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: src: build libvirt_storage_backend_iscsi.so shared module
authorPavel Hrdina <phrdina@redhat.com>
Mon, 22 Jun 2020 14:06:59 +0000 (16:06 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:27:04 +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 17a2d975cb53bca384c98a6e7e802d504522fd1a..78c2e0d3bf45755a1fc42dce15fd927c37ce1057 100644 (file)
@@ -1,10 +1,5 @@
 # vim: filetype=automake
 
-STORAGE_DRIVER_ISCSI_SOURCES = \
-       storage/storage_backend_iscsi.h \
-       storage/storage_backend_iscsi.c \
-       $(NULL)
-
 STORAGE_DRIVER_ISCSI_DIRECT_SOURCES = \
        storage/storage_backend_iscsi_direct.h \
        storage/storage_backend_iscsi_direct.c \
@@ -148,21 +143,6 @@ storage/test_virtstoraged.aug: remote/test_libvirtd.aug.in \
 
 endif WITH_STORAGE
 
-if WITH_STORAGE_ISCSI
-libvirt_storage_backend_iscsi_la_SOURCES = $(STORAGE_DRIVER_ISCSI_SOURCES)
-libvirt_storage_backend_iscsi_la_CFLAGS = \
-       -I$(srcdir)/conf \
-       $(AM_CFLAGS) \
-       $(NULL)
-
-storagebackend_LTLIBRARIES += libvirt_storage_backend_iscsi.la
-libvirt_storage_backend_iscsi_la_LDFLAGS = $(AM_LDFLAGS_MOD)
-libvirt_storage_backend_iscsi_la_LIBADD = \
-       libvirt.la \
-       $(GLIB_LIBS) \
-       $(NULL)
-endif WITH_STORAGE_ISCSI
-
 if WITH_STORAGE_ISCSI_DIRECT
 libvirt_storage_backend_iscsi_direct_la_SOURCES = \
        $(STORAGE_DRIVER_ISCSI_DIRECT_SOURCES)
index 8ac52f059edf185ec24cc3acd1d368f3905887a5..0b0f3af3054919ba241ba28795354aaf1da43457 100644 (file)
@@ -16,6 +16,10 @@ stoarge_file_fs_sources = [
   'storage_file_fs.c',
 ]
 
+storage_backend_iscsi_sources = [
+  'storage_backend_iscsi.c',
+]
+
 storage_lvm_backend_sources = [
   'storage_backend_logical.c',
 ]
@@ -67,6 +71,16 @@ if conf.has('WITH_STORAGE')
   }
 endif
 
+if conf.has('WITH_STORAGE_ISCSI')
+  virt_modules += {
+    'name': 'virt_storage_backend_iscsi',
+    'sources': [
+      files(storage_backend_iscsi_sources),
+    ],
+    'install_dir': storage_backend_install_dir,
+  }
+endif
+
 if conf.has('WITH_STORAGE_LVM')
   virt_modules += {
     'name': 'virt_storage_backend_logical',