]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: src: build libvirt_storage_backend_sheepdog.so shared module
authorPavel Hrdina <phrdina@redhat.com>
Thu, 25 Jun 2020 15:28:34 +0000 (17:28 +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/Makefile.am
src/storage/Makefile.inc.am
src/storage/meson.build

index d271485f9c889d2b4c6952740d1701167a10b476..d3a0bb2666069d139db91a8007c1957f2f54cf55 100644 (file)
@@ -24,7 +24,6 @@ BUILT_SOURCES =
 nodist_conf_DATA =
 DRIVER_SOURCE_FILES =
 STATEFUL_DRIVER_SOURCE_FILES =
-noinst_LTLIBRARIES =
 INSTALL_DATA_DIRS =
 INSTALL_DATA_LOCAL =
 UNINSTALL_LOCAL =
index b52a9e79e63e6ec6851cefe837e5e38d4827c1eb..ebb700eb1604760654e6c1825bb1a1c761a7a443 100644 (file)
@@ -1,11 +1,5 @@
 # vim: filetype=automake
 
-STORAGE_DRIVER_SHEEPDOG_SOURCES = \
-       storage/storage_backend_sheepdog.h \
-       storage/storage_backend_sheepdog.c \
-       storage/storage_backend_sheepdog_priv.h \
-       $(NULL)
-
 STORAGE_DRIVER_GLUSTER_SOURCES = \
        storage/storage_backend_gluster.h \
        storage/storage_backend_gluster.c \
@@ -118,30 +112,6 @@ storage/test_virtstoraged.aug: remote/test_libvirtd.aug.in \
 
 endif WITH_STORAGE
 
-if WITH_STORAGE_SHEEPDOG
-libvirt_storage_backend_sheepdog_la_SOURCES = \
-       $(STORAGE_DRIVER_SHEEPDOG_SOURCES)
-libvirt_storage_backend_sheepdog_la_CFLAGS = \
-       -I$(srcdir)/conf \
-       $(AM_CFLAGS) \
-       $(NULL)
-
-libvirt_storage_backend_sheepdog_priv_la_SOURCES = \
-       $(STORAGE_DRIVER_SHEEPDOG_SOURCES)
-libvirt_storage_backend_sheepdog_priv_la_CFLAGS = \
-       -I$(srcdir)/conf \
-       $(AM_CFLAGS) \
-       $(NULL)
-noinst_LTLIBRARIES += libvirt_storage_backend_sheepdog_priv.la
-
-storagebackend_LTLIBRARIES += libvirt_storage_backend_sheepdog.la
-libvirt_storage_backend_sheepdog_la_LDFLAGS = $(AM_LDFLAGS_MOD)
-libvirt_storage_backend_sheepdog_la_LIBADD = \
-       libvirt.la \
-       $(GLIB_LIBS) \
-       $(NULL)
-endif WITH_STORAGE_SHEEPDOG
-
 if WITH_STORAGE_GLUSTER
 libvirt_storage_backend_gluster_la_SOURCES = \
        $(STORAGE_DRIVER_GLUSTER_SOURCES)
index 3663b530d6957a4539d24e2f7a851bd0382edf1d..ae36f3e829e13e9c2c7eaa638eaab529b02ea898 100644 (file)
@@ -44,6 +44,10 @@ storage_backend_scsi_sources = [
   'storage_backend_scsi.c',
 ]
 
+storage_backend_sheepdog_sources = [
+  'storage_backend_sheepdog.c',
+]
+
 storage_backend_install_dir = libdir / 'libvirt' / 'storage-backend'
 storage_file_install_dir = libdir / 'libvirt' / 'storage-file'
 
@@ -169,3 +173,24 @@ if conf.has('WITH_STORAGE_SCSI')
     'install_dir': storage_backend_install_dir,
   }
 endif
+
+if conf.has('WITH_STORAGE_SHEEPDOG')
+  storage_backend_sheepdog_priv_lib = static_library(
+    'virt_storage_backend_sheepdog_priv',
+    storage_backend_sheepdog_sources,
+    dependencies: [
+      src_dep,
+    ],
+    include_directories: [
+      conf_inc_dir,
+    ],
+  )
+
+  virt_modules += {
+    'name': 'virt_storage_backend_sheepdog',
+    'link_whole': [
+      storage_backend_sheepdog_priv_lib,
+    ],
+    'install_dir': storage_backend_install_dir,
+  }
+endif