mirror of
https://gitlab.freedesktop.org/wayland/wayland-protocols.git
synced 2025-12-20 04:40:06 +01:00
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>
This commit is contained in:
parent
ec65e4366b
commit
57c78b9b8a
2 changed files with 3 additions and 1 deletions
|
|
@ -1,7 +1,7 @@
|
||||||
header_install_dir = get_option('includedir') / 'wayland-protocols'
|
header_install_dir = get_option('includedir') / 'wayland-protocols'
|
||||||
foreach protocol_file : protocol_files
|
foreach protocol_file : protocol_files
|
||||||
header_name = fs.name(protocol_file).replace('.xml', '-enum.h')
|
header_name = fs.name(protocol_file).replace('.xml', '-enum.h')
|
||||||
custom_target(
|
headers += custom_target(
|
||||||
header_name,
|
header_name,
|
||||||
output: header_name,
|
output: header_name,
|
||||||
input: '../..' / protocol_file,
|
input: '../..' / protocol_file,
|
||||||
|
|
|
||||||
|
|
@ -151,6 +151,7 @@ foreach protocol_file : installed_protocol_files
|
||||||
endforeach
|
endforeach
|
||||||
|
|
||||||
include_dirs = []
|
include_dirs = []
|
||||||
|
headers = []
|
||||||
if dep_scanner.version().version_compare('>=1.22.90')
|
if dep_scanner.version().version_compare('>=1.22.90')
|
||||||
subdir('include/wayland-protocols')
|
subdir('include/wayland-protocols')
|
||||||
include_dirs = ['include']
|
include_dirs = ['include']
|
||||||
|
|
@ -185,6 +186,7 @@ wayland_protocols = declare_dependency(
|
||||||
variables: {
|
variables: {
|
||||||
'pkgdatadir': wayland_protocols_srcdir,
|
'pkgdatadir': wayland_protocols_srcdir,
|
||||||
},
|
},
|
||||||
|
sources: headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
meson.override_dependency('wayland-protocols', wayland_protocols)
|
meson.override_dependency('wayland-protocols', wayland_protocols)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue