meson: use dependency()+find_program() for wayland-scanner
authorEmil Velikov <emil.velikov@collabora.com>
Thu, 28 Jun 2018 13:34:18 +0000 (14:34 +0100)
committerEmil Velikov <emil.l.velikov@gmail.com>
Tue, 7 Aug 2018 16:23:17 +0000 (17:23 +0100)
Helps when the native wayland-scanner is located outside of PATH.
Inspired by the xserver code ;-)

Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Reviewed-by: Dylan Baker <dylan@pnwbakers.com>
Reviewed-by: Eric Engestrom <eric.engestrom@intel.com>
meson.build

index cbaee5ceb22da23ea03608cab6dc6a5a95fdbaec..a155905312da3bbb45ea81ee1d24492617559ed2 100644 (file)
@@ -1275,7 +1275,8 @@ endif
 # TODO: symbol mangling
 
 if with_platform_wayland
-  prog_wl_scanner = find_program('wayland-scanner')
+  dep_wl_scanner = dependency('wayland-scanner', native: true)
+  prog_wl_scanner = find_program(dep_wl_scanner.get_pkgconfig_variable('wayland_scanner'))
   dep_wl_protocols = dependency('wayland-protocols', version : '>= 1.8')
   dep_wayland_client = dependency('wayland-client', version : '>=1.11')
   dep_wayland_server = dependency('wayland-server', version : '>=1.11')