Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/storage/Makefile.inc.am | 26 --------------------------
src/storage/meson.build | 15 +++++++++++++++
2 files changed, 15 insertions(+), 26 deletions(-)
diff --git a/src/storage/Makefile.inc.am b/src/storage/Makefile.inc.am
index e30f82e14fe..ee4377d94ff 100644
--- a/src/storage/Makefile.inc.am
+++ b/src/storage/Makefile.inc.am
@@ -1,9 +1,5 @@
# vim: filetype=automake
-STORAGE_HELPER_DISK_SOURCES = \
- storage/parthelper.c \
- $(NULL)
-
DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(STORAGE_DRIVER_SOURCES))
STATEFUL_DRIVER_SOURCE_FILES += \
$(addprefix $(srcdir)/,$(STORAGE_DRIVER_SOURCES))
@@ -75,25 +71,3 @@ storage/test_virtstoraged.aug: remote/test_libvirtd.aug.in \
endif WITH_STORAGE
-
-if WITH_STORAGE_DISK
-libexec_PROGRAMS += libvirt_parthelper
-
-libvirt_parthelper_SOURCES = $(STORAGE_HELPER_DISK_SOURCES)
-libvirt_parthelper_LDFLAGS = \
- $(AM_LDFLAGS) \
- $(NULL)
-libvirt_parthelper_LDADD = \
- $(LIBPARTED_LIBS) \
- libvirt.la \
- $(GLIB_LIBS) \
- $(NULL)
-if WITH_DTRACE_PROBES
-libvirt_parthelper_LDADD += libvirt_probes.lo
-endif WITH_DTRACE_PROBES
-
-libvirt_parthelper_CFLAGS = \
- $(LIBPARTED_CFLAGS) \
- $(AM_CFLAGS) \
- $(NULL)
-endif WITH_STORAGE_DISK
diff --git a/src/storage/meson.build b/src/storage/meson.build
index a18da013f8c..1996cd4c11c 100644
--- a/src/storage/meson.build
+++ b/src/storage/meson.build
@@ -20,6 +20,10 @@ storage_backend_disk_sources = [
'storage_backend_disk.c',
]
+storage_helper_disk_sources = [
+ 'parthelper.c',
+]
+
storage_backend_gluster_sources = [
'storage_backend_gluster.c',
]
@@ -127,6 +131,17 @@ if conf.has('WITH_STORAGE_DISK')
],
'install_dir': storage_backend_install_dir,
}
+
+ virt_helpers += {
+ 'name': 'libvirt_parthelper',
+ 'sources': [
+ files(storage_helper_disk_sources),
+ dtrace_gen_objects,
+ ],
+ 'deps': [
+ libparted_dep,
+ ],
+ }
endif
if conf.has('WITH_STORAGE_GLUSTER')
--
2.26.2