From 57c78b9b8a6761d80fa327046f78ccc7e3a192be Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sat, 16 Aug 2025 19:15:11 +0200 Subject: [PATCH] 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 --- include/wayland-protocols/meson.build | 2 +- meson.build | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/include/wayland-protocols/meson.build b/include/wayland-protocols/meson.build index 95af9de..a4e872b 100644 --- a/include/wayland-protocols/meson.build +++ b/include/wayland-protocols/meson.build @@ -1,7 +1,7 @@ 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( + headers += custom_target( header_name, output: header_name, input: '../..' / protocol_file, diff --git a/meson.build b/meson.build index 4f82d56..cb9792b 100644 --- a/meson.build +++ b/meson.build @@ -151,6 +151,7 @@ foreach protocol_file : installed_protocol_files endforeach include_dirs = [] +headers = [] if dep_scanner.version().version_compare('>=1.22.90') subdir('include/wayland-protocols') include_dirs = ['include'] @@ -185,6 +186,7 @@ wayland_protocols = declare_dependency( variables: { 'pkgdatadir': wayland_protocols_srcdir, }, + sources: headers, ) meson.override_dependency('wayland-protocols', wayland_protocols)