Signed-off-by: Pavel Hrdina <phrdina(a)redhat.com>
---
src/meson.build | 38 ++++++++++++++++++++++++++++++++++++++
1 file changed, 38 insertions(+)
diff --git a/src/meson.build b/src/meson.build
index 3774e2bb4ba..bb970f10c61 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -139,6 +139,16 @@ virt_modules = []
# * include = include_directories (optional, default [])
virt_daemons = []
+# virt_helpers:
+# each entry is a dictionary with following items:
+# * name - binary name (required)
+# * sources - binary sources (required)
+# * c_args - compile arguments (optional, default [])
+# * include - include_directories (optional, default [])
+# * deps - dependencies (optional, default [])
+# * install_dir - installation directory (optional, libexecdir)
+virt_helpers = []
+
# list subdirectories
@@ -509,3 +519,31 @@ foreach daemon : virt_daemons
install_rpath: libdir,
)
endforeach
+
+
+# build libvirt helpers
+
+foreach helper : virt_helpers
+ bin = executable(
+ helper['name'],
+ [
+ helper['sources'],
+ ],
+ c_args: [
+ helper.get('c_args', []),
+ ],
+ include_directories: [
+ helper.get('include', []),
+ ],
+ dependencies: [
+ src_dep,
+ helper.get('deps', []),
+ ],
+ link_with: [
+ libvirt_lib,
+ ],
+ install: true,
+ install_dir: helper.get('install_dir', libexecdir),
+ install_rpath: libdir,
+ )
+endforeach
--
2.26.2