diff options
author | Pekka Paalanen <pq@iki.fi> | 2018-12-31 12:20:22 +0200 |
---|---|---|
committer | Pekka Paalanen <pq@iki.fi> | 2018-12-31 15:16:53 +0200 |
commit | 2d7a2901b626b7d728d4bdf5f6a5a181e8db7ca3 (patch) | |
tree | feab7fb1310ccd22773764b11200850d3194698c /xwayland | |
parent | 4cf7db6d885bc5c8a5a0fc033ed69876acead65c (diff) | |
download | weston-2d7a2901b626b7d728d4bdf5f6a5a181e8db7ca3.tar.gz |
meson: better errors for xwayland deps
Helps people to disable xwayland if they don't want to install the
dependencies.
Signed-off-by: Pekka Paalanen <pq@iki.fi>
Diffstat (limited to 'xwayland')
-rw-r--r-- | xwayland/meson.build | 27 |
1 files changed, 19 insertions, 8 deletions
diff --git a/xwayland/meson.build b/xwayland/meson.build index 08f8970c..6eb7e20c 100644 --- a/xwayland/meson.build +++ b/xwayland/meson.build @@ -9,15 +9,26 @@ srcs_xwayland = [ 'dnd.c', 'hash.c', ] -deps_xwayland = [ - dependency('xcb'), - dependency('xcb-composite'), - dependency('xcb-shape'), - dependency('xcb-xfixes'), - dependency('xcursor'), - dependency('cairo-xcb'), - dep_libweston, + +dep_names_xwayland = [ + 'xcb', + 'xcb-composite', + 'xcb-shape', + 'xcb-xfixes', + 'xcursor', + 'cairo-xcb', ] + +deps_xwayland = [ dep_libweston ] + +foreach name : dep_names_xwayland + d = dependency(name, required: false) + if not d.found() + error('xwayland requires @0@ which was not found. Or, you can use \'-Dxwayland=false\'.'.format(name)) + endif + deps_xwayland += d +endforeach + plugin_xwayland = shared_library( 'xwayland', srcs_xwayland, |