aboutsummaryrefslogtreecommitdiff
path: root/xwayland
diff options
context:
space:
mode:
authorScott Anderson <scott@anderso.nz>2019-11-22 20:11:15 +1300
committerDrew DeVault <sir@cmpwn.com>2019-12-23 07:48:29 -0500
commitcff1c2f740a2f7d22339a0fae14c4923223a8d61 (patch)
treef1ecfe2a5345f3b1ef5b94260e909c5143fcd64d /xwayland
parentfc6c0ca12e941d5d7d567834bff3ab7df9447001 (diff)
meson: Various improvements
Bumps minimum version to 0.51.0 - Remove all intermediate static libraries. They serve no purpose and are just add a bunch of boilerplate for managing dependencies and options. It's now managed as a list of files which are compiled into libwlroots directly. - Use install_subdir instead of installing headers individually. I've changed my mind since I did that. Listing them out is annoying as hell, and it's easy to forget to do it. - Add not_found_message for all of our optional dependencies that have a meson option. It gives some hints about what option to pass and what the optional dependency is for. - Move all backend subdirectories into their own meson.build. This keeps some of the backend-specific build logic (especially rdp and session) more neatly separated off. - Don't overlink example clients with code they're not using. This was done by merging the protocol dictionaries and setting some variables containing the code and client header file. Example clients now explicitly mention what extension protocols they want to link to. - Split compositor example logic from client example logic. - Minor formatting changes
Diffstat (limited to 'xwayland')
-rw-r--r--xwayland/meson.build65
1 files changed, 38 insertions, 27 deletions
diff --git a/xwayland/meson.build b/xwayland/meson.build
index e5f9b9be..12c69da4 100644
--- a/xwayland/meson.build
+++ b/xwayland/meson.build
@@ -5,13 +5,24 @@ xwayland_required = [
'xcb-render',
'xcb-xfixes',
]
-xwayland_optional = [
- 'xcb-errors',
- 'xcb-icccm',
-]
+xwayland_optional = {
+ 'xcb-errors': 'Required for printing X11 errors.',
+ 'xcb-icccm': 'Required for extended X11 window manager hints.',
+}
+
+msg = []
+if get_option('xwayland').enabled()
+ msg += 'Install "@0@" or pass "-Dxwayland=disabled".'
+endif
+if not get_option('xwayland').disabled()
+ msg += 'Required for Xwayland support.'
+endif
foreach lib : xwayland_required
- dep = dependency(lib, required: get_option('xwayland'))
+ dep = dependency(lib,
+ required: get_option('xwayland'),
+ not_found_message: '\n'.join(msg).format(lib),
+ )
if not dep.found()
subdir_done()
endif
@@ -19,33 +30,33 @@ foreach lib : xwayland_required
xwayland_libs += dep
endforeach
-foreach lib : xwayland_optional
- dep = dependency(lib, required: get_option(lib))
+foreach lib, desc : xwayland_optional
+ msg = []
+ if get_option(lib).enabled()
+ msg += 'Install "@0@" or pass "-D@0@=disabled".'
+ endif
+ if not get_option(lib).disabled()
+ msg += desc
+ endif
+
+ dep = dependency(lib,
+ required: get_option(lib),
+ not_found_message: '\n'.join(msg).format(lib),
+ )
if dep.found()
xwayland_libs += dep
conf_data.set10('WLR_HAS_' + lib.underscorify().to_upper(), true)
endif
endforeach
-lib_wlr_xwayland = static_library(
- 'wlr_xwayland',
- files(
- 'selection/dnd.c',
- 'selection/incoming.c',
- 'selection/outgoing.c',
- 'selection/selection.c',
- 'sockets.c',
- 'xwayland.c',
- 'xwm.c',
- ),
- include_directories: wlr_inc,
- dependencies: [
- wayland_server,
- xwayland_libs,
- xkbcommon,
- pixman,
- ],
+wlr_files += files(
+ 'selection/dnd.c',
+ 'selection/incoming.c',
+ 'selection/outgoing.c',
+ 'selection/selection.c',
+ 'sockets.c',
+ 'xwayland.c',
+ 'xwm.c',
)
-
-wlr_parts += lib_wlr_xwayland
+wlr_deps += xwayland_libs
conf_data.set10('WLR_HAS_XWAYLAND', true)