meson.build: Don't set the dependency type for wayland-scanner 02/27102/1 12.92.0 marlin/12.92.0 marlin_12.92.0
authorMarius Vlad <marius.vlad@collabora.com>
Fri, 28 Jan 2022 11:08:45 +0000 (13:08 +0200)
committerMarius Vlad <marius.vlad@collabora.com>
Fri, 28 Jan 2022 11:45:57 +0000 (13:45 +0200)
meson (0.53) seem to be smart enough to resolve cross-compile
dependencies without setting explicitly the dependency type.

Setting the dependency  as native results in ignoring PKG_CONFIG_PATH
and using PATH to choose and alternative pkg-config. Sourcing the
yocto/OE toolchain would result in picking the hosts pkg-config due to
modified a PATH where SDKTARGETSYSROOT is before any of the hosts paths.

Combined that with the fact that PKG_CONFIG_PATH is reset when the
dependency is se to native (why that hapens is something to further
investigate) results in not finding wayland-scanner.

Tested with both yocto/OE toolchains and native (local) builds to make
sure we can still build it and seems we're fine.

Bug-AGL: SPEC-4169

Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: I5c4b12eff044aeb0c3ab4c18e943da4e15d6c411

meson.build

index bc8961d..218779d 100644 (file)
@@ -44,7 +44,7 @@ endforeach
 
 dep_libsystemd = dependency('libsystemd', required: false)
 dep_libsmack = dependency('libsmack', required: false)
-dep_scanner = dependency('wayland-scanner', native: true)
+dep_scanner = dependency('wayland-scanner')
 prog_scanner = find_program(dep_scanner.get_pkgconfig_variable('wayland_scanner'))
 dep_wp = dependency('wayland-protocols', version: '>= 1.18')
 dir_wp_base = dep_wp.get_pkgconfig_variable('pkgdatadir')