Skip to content

meson: Use built version of wayland-scanner in cross build if possible

Meson can know if it needs or has a wrapper (such as wine or qemu) to run cross built binaries. If we have a case where we either don't need a wrapper to run cross built (x86_64 -> x86, for example) or we have a wrapper (such as qemu) then don't search for a system installed version of wayland-scanner.

To force the use of a wrapper or not, you can add:

[properties]
needs_exe_wrapper = true|false

to your cross file (true to force the need for an exe wrapper, false to force running the host binaries on the build machine without a wrapper).

This solves bugs for distros like gentoo that do x86_64 and x86 build side-by-side, because the installed headers are different because they're generated with different versions of wayland-scanner.

Merge request reports