mirror of
https://gitlab.freedesktop.org/wayland/wayland.git
synced 2025-10-29 05:40:16 -04:00
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>
This commit is contained in:
parent
5ddb8dff87
commit
618663c791
4 changed files with 80 additions and 58 deletions
|
|
@ -76,16 +76,18 @@ test(
|
|||
|
||||
sed_path = find_program('sed').path()
|
||||
|
||||
test(
|
||||
'scanner-test',
|
||||
find_program('scanner-test.sh'),
|
||||
env: [
|
||||
'TEST_DATA_DIR=@0@/data'.format(meson.current_source_dir()),
|
||||
'TEST_OUTPUT_DIR=@0@/output'.format(meson.current_build_dir()),
|
||||
'SED=@0@'.format(sed_path),
|
||||
'WAYLAND_SCANNER=@0@'.format(wayland_scanner.full_path()),
|
||||
],
|
||||
)
|
||||
if get_option('scanner')
|
||||
test(
|
||||
'scanner-test',
|
||||
find_program('scanner-test.sh'),
|
||||
env: [
|
||||
'TEST_DATA_DIR=@0@/data'.format(meson.current_source_dir()),
|
||||
'TEST_OUTPUT_DIR=@0@/output'.format(meson.current_build_dir()),
|
||||
'SED=@0@'.format(sed_path),
|
||||
'WAYLAND_SCANNER=@0@'.format(wayland_scanner.full_path()),
|
||||
],
|
||||
)
|
||||
endif
|
||||
|
||||
tests = {
|
||||
'array-test': [],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue