]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
meson: src: build libvirt_driver_vbox_impl.a static library
authorPavel Hrdina <phrdina@redhat.com>
Wed, 17 Jun 2020 23:13:46 +0000 (01:13 +0200)
committerPavel Hrdina <phrdina@redhat.com>
Mon, 3 Aug 2020 07:27:04 +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/meson.build
src/vbox/Makefile.inc.am
src/vbox/meson.build [new file with mode: 0644]

index 4388ac0ab2094b108a7534f95414446a10ccc900..739132a67db34dc1ad87cd0dbafce61f203ab559 100644 (file)
@@ -166,6 +166,7 @@ subdir('lxc')
 subdir('openvz')
 subdir('qemu')
 subdir('test')
+subdir('vbox')
 subdir('vmware')
 
 
index 8acbdc84609dd59be6c96ff80395126c1bfefbb6..19ffff223b1784063ae0bc2d09cbf1673aea8149 100644 (file)
@@ -1,26 +1,5 @@
 # vim: filetype=automake
 
-VBOX_DRIVER_SOURCES = \
-       vbox/vbox_driver.c \
-       vbox/vbox_driver.h \
-       vbox/vbox_snapshot_conf.c \
-       vbox/vbox_snapshot_conf.h \
-       vbox/vbox_V5_2.c \
-       vbox/vbox_CAPI_v5_2.h \
-       vbox/vbox_CAPI_v6_0.h \
-       vbox/vbox_V6_0.c \
-       vbox/vbox_CAPI_v6_1.h \
-       vbox/vbox_V6_1.c \
-       vbox/vbox_common.c \
-       vbox/vbox_common.h \
-       vbox/vbox_uniformed_api.h \
-       vbox/vbox_get_driver.h \
-       vbox/vbox_network.c \
-       vbox/vbox_storage.c \
-       vbox/vbox_XPCOMCGlue.c \
-       vbox/vbox_XPCOMCGlue.h \
-       $(NULL)
-
 DRIVER_SOURCE_FILES += \
        $(addprefix $(srcdir)/,$(VBOX_DRIVER_SOURCES)) \
        $(srcdir)/vbox/vbox_tmpl.c \
@@ -37,19 +16,6 @@ libvirt_driver_vbox_la_LIBADD = \
 mod_LTLIBRARIES += libvirt_driver_vbox.la
 libvirt_driver_vbox_la_LDFLAGS = $(AM_LDFLAGS_MOD_NOUNDEF)
 
-libvirt_driver_vbox_impl_la_CFLAGS = \
-       -I$(srcdir)/conf \
-       $(AM_CFLAGS) \
-       -DVBOX_DRIVER \
-       $(NULL)
-libvirt_driver_vbox_impl_la_LDFLAGS = $(AM_LDFLAGS)
-libvirt_driver_vbox_impl_la_LIBADD = \
-       $(DLOPEN_LIBS) \
-       $(WIN32_EXTRA_LIBS) \
-       $(LIBXML_LIBS) \
-       $(NULL)
-libvirt_driver_vbox_impl_la_SOURCES = $(VBOX_DRIVER_SOURCES)
-
 sbin_PROGRAMS += virtvboxd
 
 nodist_conf_DATA += vbox/virtvboxd.conf
diff --git a/src/vbox/meson.build b/src/vbox/meson.build
new file mode 100644 (file)
index 0000000..c27f941
--- /dev/null
@@ -0,0 +1,31 @@
+vbox_driver_sources = [
+  'vbox_V5_2.c',
+  'vbox_V6_0.c',
+  'vbox_V6_1.c',
+  'vbox_common.c',
+  'vbox_driver.c',
+  'vbox_network.c',
+  'vbox_snapshot_conf.c',
+  'vbox_storage.c',
+  'vbox_XPCOMCGlue.c',
+]
+
+if conf.has('WITH_VBOX')
+  vbox_driver_impl = static_library(
+    'virt_driver_vbox_impl',
+    [
+      vbox_driver_sources,
+    ],
+    c_args: [
+      '-DVBOX_DRIVER',
+    ],
+    dependencies: [
+      dlopen_dep,
+      src_dep,
+      win32_dep,
+    ],
+    include_directories: [
+      conf_inc_dir,
+    ],
+  )
+endif