Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/bhyve/Makefile.inc.am | 34 ----------------------------------
src/bhyve/meson.build | 28 ++++++++++++++++++++++++++++
src/meson.build | 1 +
3 files changed, 29 insertions(+), 34 deletions(-)
create mode 100644 src/bhyve/meson.build
diff --git a/src/bhyve/Makefile.inc.am b/src/bhyve/Makefile.inc.am
index f75194fd3c8..3433e6a3dab 100644
--- a/src/bhyve/Makefile.inc.am
+++ b/src/bhyve/Makefile.inc.am
@@ -1,33 +1,9 @@
# vim: filetype=automake
-BHYVE_DRIVER_SOURCES = \
- bhyve/bhyve_capabilities.c \
- bhyve/bhyve_capabilities.h \
- bhyve/bhyve_command.c \
- bhyve/bhyve_command.h \
- bhyve/bhyve_conf.c \
- bhyve/bhyve_conf.h \
- bhyve/bhyve_parse_command.c \
- bhyve/bhyve_parse_command.h \
- bhyve/bhyve_device.c \
- bhyve/bhyve_device.h \
- bhyve/bhyve_domain.c \
- bhyve/bhyve_domain.h \
- bhyve/bhyve_driver.h \
- bhyve/bhyve_driver.c \
- bhyve/bhyve_monitor.c \
- bhyve/bhyve_monitor.h \
- bhyve/bhyve_process.c \
- bhyve/bhyve_process.h \
- bhyve/bhyve_utils.h \
- $(NULL)
-
DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(BHYVE_DRIVER_SOURCES))
STATEFUL_DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(BHYVE_DRIVER_SOURCES))
-
if WITH_BHYVE
-noinst_LTLIBRARIES += libvirt_driver_bhyve_impl.la
libvirt_driver_bhyve_la_SOURCES =
libvirt_driver_bhyve_la_LIBADD = \
libvirt_driver_bhyve_impl.la \
@@ -37,16 +13,6 @@ libvirt_driver_bhyve_la_LIBADD = \
mod_LTLIBRARIES += libvirt_driver_bhyve.la
libvirt_driver_bhyve_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
-libvirt_driver_bhyve_impl_la_CFLAGS = \
- -I$(srcdir)/access \
- -I$(builddir)/access \
- -I$(srcdir)/conf \
- -I$(srcdir)/hypervisor \
- $(AM_CFLAGS) \
- $(NULL)
-libvirt_driver_bhyve_impl_la_LDFLAGS = $(AM_LDFLAGS)
-libvirt_driver_bhyve_impl_la_SOURCES = $(BHYVE_DRIVER_SOURCES)
-
sbin_PROGRAMS += virtbhyved
nodist_conf_DATA += bhyve/virtbhyved.conf
diff --git a/src/bhyve/meson.build b/src/bhyve/meson.build
new file mode 100644
index 00000000000..a9af677440b
--- /dev/null
+++ b/src/bhyve/meson.build
@@ -0,0 +1,28 @@
+bhyve_sources = files(
+ 'bhyve_capabilities.c',
+ 'bhyve_command.c',
+ 'bhyve_conf.c',
+ 'bhyve_parse_command.c',
+ 'bhyve_device.c',
+ 'bhyve_domain.c',
+ 'bhyve_driver.c',
+ 'bhyve_monitor.c',
+ 'bhyve_process.c',
+)
+
+if conf.has('WITH_BHYVE')
+ bhyve_driver_impl = static_library(
+ 'virt_driver_bhyve_impl',
+ [
+ bhyve_sources,
+ ],
+ dependencies: [
+ access_dep,
+ src_dep,
+ ],
+ include_directories: [
+ conf_inc_dir,
+ hypervisor_inc_dir,
+ ],
+ )
+endif
diff --git a/src/meson.build b/src/meson.build
index 9c088014415..ca94fe64bd9 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -145,6 +145,7 @@ subdir('locking')
subdir('logging')
subdir('security')
+subdir('bhyve')
subdir('esx')
subdir('hyperv')
subdir('openvz')
--
2.26.2