wayland-protocols/include/wayland-protocols/meson.build
Simon Ser 57c78b9b8a build: add headers to declare_dependency() sources
Before the dependency is usable, enum headers need to be built.
Fixes missing header files when wayland-protocols is used as a
subproject.

Signed-off-by: Simon Ser <contact@emersion.fr>
2025-08-27 16:15:07 +00:00

18 lines
434 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')
headers += 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