aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorScott Anderson <scott@anderso.nz>2018-08-22 20:27:37 +1200
committerScott Anderson <scott@anderso.nz>2018-08-22 20:27:37 +1200
commit784c20c82fb6fb84c5ce49993b5a2ec0bda13475 (patch)
treee106a1e91607f78c1fe0a7ebe5e1f3125d5ee3bb /xwayland
parent94ed2fc7bbe9f673f064d3cc5e6841a3879a4268 (diff)
Use new options for X11 backend and Xwayland
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/meson.build41
1 files changed, 34 insertions, 7 deletions
diff --git a/xwayland/meson.build b/xwayland/meson.build
index ec486f58..637f565e 100644
--- a/xwayland/meson.build
+++ b/xwayland/meson.build
@@ -1,3 +1,33 @@
+xwayland_libs = []
+xwayland_required = [
+ 'xcb',
+ 'xcb-composite',
+ 'xcb-render',
+ 'xcb-xfixes',
+]
+xwayland_optional = [
+ 'xcb-errors',
+ 'xcb-icccm',
+]
+
+foreach lib : xwayland_required
+ dep = dependency(lib, required: get_option('xwayland'))
+ if not dep.found()
+ exclude_headers += 'xwayland.h'
+ subdir_done()
+ endif
+
+ xwayland_libs += dep
+endforeach
+
+foreach lib : xwayland_optional
+ dep = dependency(lib, required: get_option(lib))
+ if dep.found()
+ xwayland_libs += dep
+ conf_data.set('WLR_HAS_' + lib.underscorify().to_upper(), true)
+ endif
+endforeach
+
lib_wlr_xwayland = static_library(
'wlr_xwayland',
files(
@@ -12,14 +42,11 @@ lib_wlr_xwayland = static_library(
include_directories: wlr_inc,
dependencies: [
wayland_server,
- xcb,
- xcb_composite,
- xcb_xfixes,
- xcb_image,
- xcb_render,
- xcb_icccm,
- xcb_errors,
+ xwayland_libs,
xkbcommon,
pixman,
],
)
+
+wlr_parts += lib_wlr_xwayland
+conf_data.set('WLR_HAS_XWAYLAND', true)