meson: src: build libvirt_storage_backend_sheepdog.so shared module

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
This commit is contained in:
Pavel Hrdina 2020-06-25 17:28:34 +02:00
parent 0e4f554fb7
commit 7926b1f094
3 changed files with 25 additions and 31 deletions

View 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 =

View 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)

View 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