aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-08-23 20:41:07 -0400
committerGitHub <noreply@github.com>2018-08-23 20:41:07 -0400
commitdea311992eb4ff3e343c3cf5b0603034223d2a42 (patch)
tree6876337b81c01c13d53d6c4f2e3680c51fd9e204 /xwayland
parent6db9c4b74667c1d917d720f5e96985a2461569fb (diff)
parent39ac21401fddd36474df0191603c0616d332e6da (diff)
Merge pull request #1194 from ascent12/meson_feature
Build system changes
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/meson.build40
1 files changed, 33 insertions, 7 deletions
diff --git a/xwayland/meson.build b/xwayland/meson.build
index ec486f58..0bd88924 100644
--- a/xwayland/meson.build
+++ b/xwayland/meson.build
@@ -1,3 +1,32 @@
+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()
+ 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 +41,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)