aboutsummaryrefslogtreecommitdiffstats
path: root/src/meson.build
diff options
context:
space:
mode:
authorMichael Weiss <dev.primeos@gmail.com>2021-04-02 19:26:57 +0200
committerMichael Weiss <dev.primeos@gmail.com>2021-04-02 20:55:15 +0200
commite4659ffbf5ee32cb55a045bf63ae1e81c0c2938c (patch)
treefeb2e1972c9eb0919cc8367a17cbf59ebd3aef3c /src/meson.build
parentci: Use ci-fairy to check for Signed-off-by (diff)
downloadwayland-e4659ffbf5ee32cb55a045bf63ae1e81c0c2938c.tar
wayland-e4659ffbf5ee32cb55a045bf63ae1e81c0c2938c.tar.gz
wayland-e4659ffbf5ee32cb55a045bf63ae1e81c0c2938c.tar.bz2
wayland-e4659ffbf5ee32cb55a045bf63ae1e81c0c2938c.tar.lz
wayland-e4659ffbf5ee32cb55a045bf63ae1e81c0c2938c.tar.xz
wayland-e4659ffbf5ee32cb55a045bf63ae1e81c0c2938c.tar.zst
wayland-e4659ffbf5ee32cb55a045bf63ae1e81c0c2938c.zip
meson: Only require expat when building wayland-scanner
This code is only required for building wayland-scanner so it should be scoped accordingly. libxml-2.0 will only be required if both "scanner" and "dtd_validation" are set to true. Signed-off-by: Michael Weiss <dev.primeos@gmail.com>
Diffstat (limited to 'src/meson.build')
-rw-r--r--src/meson.build10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/meson.build b/src/meson.build
index d91c503..b6b248c 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -26,6 +26,14 @@ wayland_util_dep = declare_dependency(
if get_option('scanner')
# wayland-scanner
+ scanner_deps = [ dependency('expat') ]
+ scanner_args = [ '-include', 'config.h' ]
+
+ if get_option('dtd_validation')
+ scanner_deps += dependency('libxml-2.0')
+ scanner_args += '-DHAVE_LIBXML=1'
+ endif
+
configure_file(
input: '../protocol/wayland.dtd',
output: 'wayland.dtd.embed',
@@ -38,7 +46,7 @@ if get_option('scanner')
wayland_scanner = executable(
'wayland-scanner',
wayland_scanner_sources,
- c_args: [ '-include', 'config.h' ],
+ c_args: scanner_args,
include_directories: wayland_scanner_includes,
dependencies: [ scanner_deps, wayland_util_dep, ],
install: true