mirror of
https://gitlab.freedesktop.org/wayland/wayland-protocols.git
synced 2026-05-22 10:08:10 +02:00
build: Make wayland-scanner optional
Currently when tests are disabled, wayland-scanner >= 1.20.0 is still required, even if the headers generation is optional. The proper dependency is : - wayland-scanner >= 1.25.0 (mandatory) when building tests - wayland-scanner >= 1.22.90 (optional) for headers Signed-off-by: Loïc Yhuel <loic.yhuel@softathome.com>
This commit is contained in:
parent
85a2f3f265
commit
93866af3d7
1 changed files with 6 additions and 3 deletions
|
|
@ -9,11 +9,14 @@ wayland_protocols_version = meson.project_version()
|
|||
fs = import('fs')
|
||||
|
||||
dep_scanner = dependency('wayland-scanner',
|
||||
version: get_option('tests') ? '>=1.25.0' : '>=1.20.0',
|
||||
version: get_option('tests') ? '>=1.25.0' : '>=1.22.90',
|
||||
required: get_option('tests'),
|
||||
native: true,
|
||||
fallback: 'wayland'
|
||||
)
|
||||
prog_scanner = find_program(dep_scanner.get_variable(pkgconfig: 'wayland_scanner', internal: 'wayland_scanner'))
|
||||
if dep_scanner.found()
|
||||
prog_scanner = find_program(dep_scanner.get_variable(pkgconfig: 'wayland_scanner', internal: 'wayland_scanner'))
|
||||
endif
|
||||
|
||||
stable_protocols = {
|
||||
'linux-dmabuf': {'v1': []},
|
||||
|
|
@ -175,7 +178,7 @@ endforeach
|
|||
|
||||
include_dirs = []
|
||||
headers = []
|
||||
if dep_scanner.version().version_compare('>=1.22.90')
|
||||
if dep_scanner.found()
|
||||
subdir('include/wayland-protocols')
|
||||
include_dirs = ['include']
|
||||
endif
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue