@@ -169,6 +169,10 @@ if 'dtrace' in get_option('trace_backends')
endif
endif
+add_project_arguments('-I' + meson.current_source_dir() / 'subprojects/qemu-common/include',
+ language: ['c', 'cpp', 'objc'],
+)
+
if get_option('iasl') == ''
iasl = find_program('iasl', required: false)
else
@@ -1583,6 +1587,9 @@ if libbpf.found() and not cc.links('''
endif
endif
+qemu_common = subproject('qemu-common')
+qemu_common = qemu_common.get_variable('qemu_common_dep')
+
#################
# config-host.h #
#################
@@ -3057,7 +3064,7 @@ util_ss.add_all(trace_ss)
util_ss = util_ss.apply(config_all, strict: false)
libqemuutil = static_library('qemuutil',
sources: util_ss.sources() + stub_ss.sources() + genh,
- dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, pixman])
+ dependencies: [util_ss.dependencies(), libm, threads, glib, socket, malloc, pixman, qemu_common])
qemuutil = declare_dependency(link_with: libqemuutil,
sources: genh + version_res,
dependencies: [event_loop_base])
similarity index 100%
rename from include/qemu/help-texts.h
rename to subprojects/qemu-common/include/qemu/help-texts.h
@@ -2,6 +2,8 @@ project('libvduse', 'c',
license: 'GPL-2.0-or-later',
default_options: ['c_std=gnu99'])
+qemu_common = subproject('qemu-common')
+
libvduse = static_library('vduse',
files('libvduse.c'),
c_args: '-D_GNU_SOURCE')
new file mode 120000
@@ -0,0 +1 @@
+../../qemu-common
\ No newline at end of file
@@ -5,6 +5,8 @@ project('libvhost-user', 'c',
threads = dependency('threads')
glib = dependency('glib-2.0')
+qemu_common = subproject('qemu-common')
+
vhost_user = static_library('vhost-user',
files('libvhost-user.c'),
dependencies: threads,
new file mode 120000
@@ -0,0 +1 @@
+../../qemu-common
\ No newline at end of file
new file mode 100644
@@ -0,0 +1,8 @@
+project('qemu-common', 'c',
+ license: 'GPL-2.0-or-later',
+ default_options: ['c_std=gnu11']
+)
+
+qemu_common_dep = declare_dependency(
+ include_directories: include_directories('include'),
+)