meson: convert common QMP bits for qemu and qemu-storage-daemon
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
diff --git a/meson.build b/meson.build
index 6d5eb31..9d1a530 100644
--- a/meson.build
+++ b/meson.build
@@ -475,6 +475,7 @@
trace_ss = ss.source_set()
block_ss = ss.source_set()
blockdev_ss = ss.source_set()
+qmp_ss = ss.source_set()
common_ss = ss.source_set()
softmmu_ss = ss.source_set()
user_ss = ss.source_set()
@@ -655,6 +656,7 @@
common_ss.add(files('cpus-common.c'))
subdir('softmmu')
+subdir('monitor')
# needed for fuzzing binaries
subdir('tests/qtest/libqos')
@@ -704,6 +706,14 @@
link_args: '@block.syms',
dependencies: [crypto, io])
+qmp_ss = qmp_ss.apply(config_host, strict: false)
+libqmp = static_library('qmp', qmp_ss.sources() + genh,
+ dependencies: qmp_ss.dependencies(),
+ name_suffix: 'fa',
+ build_by_default: false)
+
+qmp = declare_dependency(link_whole: [libqmp])
+
foreach m : block_mods + softmmu_mods
shared_module(m.name(),
name_prefix: '',