]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: src: build libvirt_parthelper binary
authorPavel Hrdina <phrdina@redhat.com>
Wed, 24 Jun 2020 11:31:31 +0000 (13:31 +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 e30f82e14fe9081615534136fe223cb78030817d..ee4377d94ff21f1c11eebf4433bfbb3f45f49035 100644 (file)
@@ -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
index a18da013f8c248b939bf8067768e93f05e7b7c99..1996cd4c11ca597f923045a0747f83ce6fb60cac 100644 (file)
@@ -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')