mirror of
https://gitlab.freedesktop.org/wayland/wayland-protocols.git
synced 2025-12-20 16:20:09 +01:00
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>
18 lines
423 B
Meson
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
|