diff options
| author | Matt Turner <mattst88@gmail.com> | 2020-03-05 12:04:36 -0800 |
|---|---|---|
| committer | Matt Turner <mattst88@gmail.com> | 2020-03-13 10:25:24 -0700 |
| commit | 618663c791092bb82dc0a153a4a2fe97582a54bc (patch) | |
| tree | 093358daf79b24ea4c967387e7ac943579d11887 /meson.build | |
| parent | meson: Require wayland-scanner of a matching version (diff) | |
| download | wayland-618663c791092bb82dc0a153a4a2fe97582a54bc.tar wayland-618663c791092bb82dc0a153a4a2fe97582a54bc.tar.gz wayland-618663c791092bb82dc0a153a4a2fe97582a54bc.tar.bz2 wayland-618663c791092bb82dc0a153a4a2fe97582a54bc.tar.lz wayland-618663c791092bb82dc0a153a4a2fe97582a54bc.tar.xz wayland-618663c791092bb82dc0a153a4a2fe97582a54bc.tar.zst wayland-618663c791092bb82dc0a153a4a2fe97582a54bc.zip | |
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>
Diffstat (limited to 'meson.build')
| -rw-r--r-- | meson.build | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/meson.build b/meson.build index 26b084f..540dee8 100644 --- a/meson.build +++ b/meson.build @@ -84,19 +84,20 @@ if get_option('libraries') subdir('cursor') subdir('egl') subdir('tests') + if get_option('documentation') + subdir('doc') + endif endif -if get_option('documentation') - subdir('doc') -endif - -install_data([ - 'wayland-scanner.mk', - 'protocol/wayland.xml', - 'protocol/wayland.dtd', -]) +if get_option('scanner') + install_data([ + 'wayland-scanner.mk', + 'protocol/wayland.xml', + 'protocol/wayland.dtd', + ]) -install_data( - [ 'wayland-scanner.m4' ], - install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'aclocal'), -) + install_data( + [ 'wayland-scanner.m4' ], + install_dir: join_paths(get_option('prefix'), get_option('datadir'), 'aclocal'), + ) +endif |
