From 24244f26bfb39f7aef7606b503172bcb122b6477 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 4 Apr 2022 09:34:33 -0400 Subject: [PATCH] Meson: Override wayland-scanner if it can be run This allows projects to use Wayland as a Meson subproject and get the wayland-scanner executable when doing find_program('wayland-scanner'). Signed-off-by: Xavier Claessens --- src/meson.build | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/meson.build b/src/meson.build index a601724..a8a1d2b 100644 --- a/src/meson.build +++ b/src/meson.build @@ -71,6 +71,10 @@ if get_option('scanner') ], filebase: 'wayland-scanner' ) + + if meson.can_run_host_binaries() + meson.override_find_program('wayland-scanner', wayland_scanner) + endif endif if meson.is_cross_build() or not get_option('scanner') -- 2.7.4