summaryrefslogtreecommitdiff
path: root/subprojects/libvhost-user/meson.build
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2020-11-25 14:06:37 +0400
committerMichael S. Tsirkin <mst@redhat.com>2020-12-08 13:48:58 -0500
commit0df750e9d3a5fea5e19f4750582121c9293a9d71 (patch)
treed1333e36fdf7bc7d8e5dbbbc8c7398748d6a2756 /subprojects/libvhost-user/meson.build
parent3d22bd27acd93281354b10c6bf787b720685eb80 (diff)
downloadqemu-0df750e9d3a5fea5e19f4750582121c9293a9d71.zip
libvhost-user: make it a meson subproject
By making libvhost-user a subproject, check it builds standalone (without the global QEMU cflags etc). Note that the library still relies on QEMU include/qemu/atomic.h and linux_headers/. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Message-Id: <20201125100640.366523-6-marcandre.lureau@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'subprojects/libvhost-user/meson.build')
-rw-r--r--subprojects/libvhost-user/meson.build20
1 files changed, 20 insertions, 0 deletions
diff --git a/subprojects/libvhost-user/meson.build b/subprojects/libvhost-user/meson.build
new file mode 100644
index 0000000000..f9ecc534cf
--- /dev/null
+++ b/subprojects/libvhost-user/meson.build
@@ -0,0 +1,20 @@
+project('libvhost-user', 'c',
+ license: 'GPL-2.0-or-later',
+ default_options: ['c_std=gnu99'])
+
+glib = dependency('glib-2.0')
+inc = include_directories('../../include', '../../linux-headers')
+
+vhost_user = static_library('vhost-user',
+ files('libvhost-user.c'),
+ include_directories: inc,
+ c_args: '-D_GNU_SOURCE')
+
+vhost_user_glib = static_library('vhost-user-glib',
+ files('libvhost-user-glib.c'),
+ include_directories: inc,
+ link_with: vhost_user,
+ dependencies: glib)
+
+vhost_user_dep = declare_dependency(link_with: vhost_user_glib,
+ include_directories: include_directories('.'))