From 5605b72e00c75ce13554b1622307bd1760787ea9 Mon Sep 17 00:00:00 2001 From: Pekka Paalanen Date: Mon, 7 Jan 2019 21:33:08 +0200 Subject: [PATCH] meson: better error for tests missing libX11 Helps people avoid libX11 at the cost of disabling Xwayland support. Signed-off-by: Pekka Paalanen --- tests/meson.build | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/meson.build b/tests/meson.build index 048a5398..980062c0 100644 --- a/tests/meson.build +++ b/tests/meson.build @@ -167,7 +167,11 @@ tests_weston = [ ] if get_option('xwayland') - tests_weston += [ [ 'xwayland', [], dependency('x11') ] ] + d = dependency('x11', required: false) + if not d.found() + error('Xwayland tests require libX11 which was not found. Or, you can use \'-Dxwayland=false\'.') + endif + tests_weston += [ [ 'xwayland', [], d ] ] endif tests_weston_plugin = [