meson: better error for tests missing libX11

Helps people avoid libX11 at the cost of disabling Xwayland support.

Signed-off-by: Pekka Paalanen <pq@iki.fi>
This commit is contained in:
Pekka Paalanen 2019-01-07 21:33:08 +02:00 committed by Daniel Stone
parent 91bf16be7d
commit 5605b72e00

View file

@ -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 = [