build: add Meson fallback for wayland-protocols

This allows easily co-developing a Wayland protocol and Weston.
Example setup:

    ln -s subprojects/wayland-protocols /path/to/wayland-protocols
    meson configure build/ --force-fallback-for=wayland-protocols

Signed-off-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
Simon Ser 2021-11-22 14:41:23 +01:00 committed by Marius Vlad
parent 0a8e3cbc4a
commit 4887f1a7aa
2 changed files with 4 additions and 3 deletions

View File

@ -6,7 +6,7 @@ project('weston',
'c_std=gnu99',
'b_lundef=true',
],
meson_version: '>= 0.52.1',
meson_version: '>= 0.54.0',
license: 'MIT/Expat',
)

View File

@ -1,8 +1,9 @@
dep_scanner = dependency('wayland-scanner', native: true)
prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner'))
dep_wp = dependency('wayland-protocols', version: '>= 1.24')
dir_wp_base = dep_wp.get_pkgconfig_variable('pkgdatadir')
dep_wp = dependency('wayland-protocols', version: '>= 1.24',
fallback: ['wayland-protocols', 'wayland_protocols'])
dir_wp_base = dep_wp.get_variable(pkgconfig: 'pkgdatadir', internal: 'pkgdatadir')
install_data(
[