summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorOlivier Fourdan <ofourdan@redhat.com>2020-04-20 11:29:16 +0200
committerOlivier Fourdan <fourdan@gmail.com>2020-07-08 08:56:32 +0000
commit5188603ff7d25186c9076fefeceba825f3a40d47 (patch)
treed8b240df9f3251b15b0ce164805fb97e2bc5060d /meson.build
parent2beefda5a80e5a016c32c1da733f9415a121179d (diff)
xwayland: Add a pkg-config file for Xwayland
Xwayland is usually spawned by the Wayland compositor which sets the command line options. If a command line option is not supported, Xwayland will fail to start. That somehow makes the Xwayland command line option sort of ABI, the Wayland compositor need to know if a particular option is supported by Xwayland at build time. Also, currently, Xwayland is being installed along with the rest of the common executable programs that users may run, which is sub-optimal because, well, Xwayland is not a common executable program, it's meant to be a proxy between the Wayland compositor and the legacy X11 clients which wouldn't be able to run on Wayland otherwise. Xwayland would be better installed in `libexec` but that directory is (purposedly) not in the user `PATH` and therefore the Wayland compositor may not be able to find Xwayland in that case. To solve both problems (which options are supported by Xwayland and where to look for it), add a `pkg-config` file specifically for Xwayland which gives the full path to Xwayland (`xwayland`) and which options it supports (using `pkg-config` variables). The `pkg-config` file also provides the `Version` so the build scripts can check for a particular version if necessary. Obviously, Wayland compositors are not required to use the `pkg-config` file and can continue to use whatever mechanism they deem preferable. Signed-off-by: Olivier Fourdan <ofourdan@redhat.com> Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build5
1 files changed, 5 insertions, 0 deletions
diff --git a/meson.build b/meson.build
index dd3ef8fd6..d9535fb86 100644
--- a/meson.build
+++ b/meson.build
@@ -200,6 +200,11 @@ if (host_machine.system() != 'darwin' and
xwayland_required = get_option('xwayland') == 'true'
build_glamor = glamor_option == 'true' or glamor_option == 'auto'
+ xwayland_path = get_option('xwayland-path')
+ if (xwayland_path == '')
+ xwayland_path = join_paths(get_option('prefix'), get_option('bindir'))
+ endif
+
xwayland_dep = [
dependency('wayland-client', version: wayland_req, required: xwayland_required),
dependency('wayland-protocols', version: wayland_protocols_req, required: xwayland_required),