meson: Require wayland-scanner of a matching version

We have always built libwayland with the scanner from the same build so
that the generated code and installed headers are exactly up-to-date
with the libwayland version. If libwayland was to use a scanner later
than itself, the scanner might do things that are not available in the
libwayland at hand, leading to a broken build or a broken library
(headers).

Signed-off-by: Matt Turner <mattst88@gmail.com>
This commit is contained in:
Matt Turner 2020-03-06 10:04:53 -08:00
parent 8d5fadad47
commit 5ddb8dff87

View file

@ -55,7 +55,7 @@ pkgconfig.generate(
)
if meson.is_cross_build()
scanner_dep = dependency('wayland-scanner', native: true, version: '>=1.14.0')
scanner_dep = dependency('wayland-scanner', native: true, version: meson.project_version())
wayland_scanner_for_build = find_program(scanner_dep.get_pkgconfig_variable('wayland_scanner'))
else
wayland_scanner_for_build = wayland_scanner