summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorMarc-André Lureau2019-07-15 16:06:04 +0200
committerPaolo Bonzini2020-08-21 12:30:14 +0200
commit3f88565997791aa8de21c030bd2a391edfbd8d87 (patch)
tree3c071b4e9b4f6b9cf6300118404ac99c5a5e70f2 /meson.build
parentmeson: generate shader headers (diff)
downloadqemu-3f88565997791aa8de21c030bd2a391edfbd8d87.tar.gz
qemu-3f88565997791aa8de21c030bd2a391edfbd8d87.tar.xz
qemu-3f88565997791aa8de21c030bd2a391edfbd8d87.zip
meson: generate hxtool files
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build22
1 files changed, 22 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index 2fb209b228..222b0d0e77 100644
--- a/meson.build
+++ b/meson.build
@@ -159,6 +159,7 @@ have_block = have_system or have_tools
# Generators
genh = []
+hxtool = find_program('scripts/hxtool')
shaderinclude = find_program('scripts/shaderinclude.pl')
qapi_gen = find_program('scripts/qapi-gen.py')
qapi_gen_depends = [ meson.source_root() / 'scripts/qapi/__init__.py',
@@ -196,6 +197,27 @@ qemu_version = custom_target('qemu-version.h',
build_always_stale: true)
genh += qemu_version
+hxdep = []
+hx_headers = [
+ ['qemu-options.hx', 'qemu-options.def'],
+ ['qemu-img-cmds.hx', 'qemu-img-cmds.h'],
+]
+if have_system
+ hx_headers += [
+ ['hmp-commands.hx', 'hmp-commands.h'],
+ ['hmp-commands-info.hx', 'hmp-commands-info.h'],
+ ]
+endif
+foreach d : hx_headers
+ custom_target(d[1],
+ input: files(d[0]),
+ output: d[1],
+ capture: true,
+ build_by_default: true, # to be removed when added to a target
+ command: [hxtool, '-h', '@INPUT0@'])
+endforeach
+genh += hxdep
+
# Collect sourcesets.
util_ss = ss.source_set()