wayland-protocols/include/wayland-protocols/meson.build
Simon Ser c997223583 build: install headers with enums
Generate and install headers containing enums. See [1].

Meson requires us to generate headers in a "include/wayland-protocols"
directory, so that include paths can be properly set up when used
as a sub-project.

[1]: https://gitlab.freedesktop.org/wayland/wayland/-/merge_requests/312

Signed-off-by: Simon Ser <contact@emersion.fr>
2024-10-05 15:30:01 +00:00

18 lines
423 B
Meson

header_install_dir = get_option('includedir') / 'wayland-protocols'
foreach protocol_file : protocol_files
header_name = fs.name(protocol_file).replace('.xml', '-enum.h')
custom_target(
header_name,
output: header_name,
input: '../..' / protocol_file,
command: [
prog_scanner,
'--strict',
'enum-header',
'@INPUT@',
'@OUTPUT@',
],
install: true,
install_dir: header_install_dir,
)
endforeach