Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/interface/Makefile.inc.am | 33 ---------------------------------
src/interface/meson.build | 29 +++++++++++++++++++++++++++++
src/meson.build | 1 +
3 files changed, 30 insertions(+), 33 deletions(-)
create mode 100644 src/interface/meson.build
diff --git a/src/interface/Makefile.inc.am b/src/interface/Makefile.inc.am
index deff49fa65d..9a56e0b4e0f 100644
--- a/src/interface/Makefile.inc.am
+++ b/src/interface/Makefile.inc.am
@@ -1,43 +1,10 @@
# vim: filetype=automake
-INTERFACE_DRIVER_SOURCES = \
- interface/interface_driver.h \
- interface/interface_driver.c \
- $(NULL)
-
-INTERFACE_DRIVER_NETCF_SOURCES = interface/interface_backend_netcf.c
-INTERFACE_DRIVER_UDEV_SOURCES = interface/interface_backend_udev.c
-
DRIVER_SOURCE_FILES += $(addprefix $(srcdir)/,$(INTERFACE_DRIVER_SOURCES))
STATEFUL_DRIVER_SOURCE_FILES += \
$(addprefix $(srcdir)/,$(INTERFACE_DRIVER_SOURCES))
if WITH_INTERFACE
-mod_LTLIBRARIES += libvirt_driver_interface.la
-libvirt_driver_interface_la_CFLAGS = \
- -I$(srcdir)/access \
- -I$(builddir)/access \
- -I$(srcdir)/conf \
- $(AM_CFLAGS) \
- $(LIBNL_CFLAGS) \
- $(NULL)
-libvirt_driver_interface_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
-libvirt_driver_interface_la_LIBADD = \
- libvirt.la \
- $(GLIB_LIBS) \
- $(NULL)
-libvirt_driver_interface_la_SOURCES = $(INTERFACE_DRIVER_SOURCES)
-if WITH_NETCF
-libvirt_driver_interface_la_CFLAGS += $(NETCF_CFLAGS)
-libvirt_driver_interface_la_LIBADD += $(NETCF_LIBS)
-libvirt_driver_interface_la_SOURCES += $(INTERFACE_DRIVER_NETCF_SOURCES)
-endif WITH_NETCF
-if WITH_UDEV
-libvirt_driver_interface_la_CFLAGS += $(UDEV_CFLAGS)
-libvirt_driver_interface_la_LIBADD += $(UDEV_LIBS)
-libvirt_driver_interface_la_SOURCES += $(INTERFACE_DRIVER_UDEV_SOURCES)
-endif WITH_UDEV
-
sbin_PROGRAMS += virtinterfaced
nodist_conf_DATA += interface/virtinterfaced.conf
diff --git a/src/interface/meson.build b/src/interface/meson.build
new file mode 100644
index 00000000000..bb08706f21c
--- /dev/null
+++ b/src/interface/meson.build
@@ -0,0 +1,29 @@
+interface_driver_sources = [
+ 'interface_driver.c',
+]
+
+if conf.has('WITH_NETCF')
+ interface_driver_sources += 'interface_backend_netcf.c'
+endif
+
+if conf.has('WITH_UDEV')
+ interface_driver_sources += 'interface_backend_udev.c'
+endif
+
+if conf.has('WITH_INTERFACE')
+ virt_modules += {
+ 'name': 'virt_driver_interface',
+ 'sources': [
+ files(interface_driver_sources),
+ ],
+ 'deps': [
+ access_dep,
+ libnl_dep,
+ netcf_dep,
+ udev_dep,
+ ],
+ 'link_args': [
+ libvirt_no_undefined,
+ ],
+ }
+endif
diff --git a/src/meson.build b/src/meson.build
index 991991118ba..92f80b5838b 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -154,6 +154,7 @@ subdir('vmx')
subdir('remote')
subdir('admin')
+subdir('interface')
subdir('locking')
subdir('logging')
subdir('network')
--
2.26.2