meson: Add option to control building wayland-scanner
authorMatt Turner <mattst88@gmail.com>
Thu, 5 Mar 2020 20:04:36 +0000 (12:04 -0800)
committerMatt Turner <mattst88@gmail.com>
Fri, 13 Mar 2020 17:25:24 +0000 (10:25 -0700)
commit618663c791092bb82dc0a153a4a2fe97582a54bc
tree093358daf79b24ea4c967387e7ac943579d11887
parent5ddb8dff878f3addd349bf58860cb6fad0a013ce
meson: Add option to control building wayland-scanner

Wayland requires a binary, wayland-scanner, to be run during the build
process. For any configuration other than native builds (including
cross compiling and even 32-bit x86 builds on an x86-64 build machine)
Wayland's build process builds and uses its own wayland-scanner.

For any builds using a cross file, wayland-scanner is built for the host
machine and therefore cannot be executed during the build of the Wayland
libraries. Instead builds using a cross file must execute the build
machine's wayland-scanner (typically /usr/bin/wayland-scanner).

As such, to build Wayland's libraries for a non-native ABI a package
manager must build and install /usr/bin/wayland-scanner first. But then
the build for the native ABI then rebuilds wayland-scanner itself and
doesn't use the system's, and worse, wants to install its own, which
conflicts with the /usr/bin/wayland-scanner already installed!

So, add the -Dscanner=... option to control whether to install
wayland-scanner.

Signed-off-by: Matt Turner <mattst88@gmail.com>
meson.build
meson_options.txt
src/meson.build
tests/meson.build