aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2021-02-04 17:31:12 +0100
committerSimon Ser <contact@emersion.fr>2021-03-03 18:19:12 +0100
commit3504bb587daade365c11bd91568bc175b303be57 (patch)
treec56966a4d50b0257518af751855e8e69f9264ac6
parent73137ace84bcb3acd156446abcbcf65034ff1f40 (diff)
xwayland: add dependency on xwayland
Check that the pkg-config file is available. This will be required in the future to check whether xwayland supports features such as -listenfd, -initfd or -verbose. If there's no pkg-config file, check that the Xwayland executable is available. This effectively makes our relationship with xwayland closer to what a dynamic library is: checked at build-time, but can be overridden at run-time.
-rw-r--r--.builds/alpine.yml1
-rw-r--r--.builds/archlinux.yml1
-rw-r--r--.builds/freebsd.yml1
-rw-r--r--README.md1
-rw-r--r--xwayland/meson.build13
5 files changed, 17 insertions, 0 deletions
diff --git a/.builds/alpine.yml b/.builds/alpine.yml
index 1b09320a..9bb633b0 100644
--- a/.builds/alpine.yml
+++ b/.builds/alpine.yml
@@ -13,6 +13,7 @@ packages:
- xcb-util-image-dev
- xcb-util-renderutil-dev
- xcb-util-wm-dev
+ - xorg-server-xwayland
sources:
- https://github.com/swaywm/wlroots
tasks:
diff --git a/.builds/archlinux.yml b/.builds/archlinux.yml
index c4346179..27601d21 100644
--- a/.builds/archlinux.yml
+++ b/.builds/archlinux.yml
@@ -13,6 +13,7 @@ packages:
- xcb-util-image
- xcb-util-renderutil
- xcb-util-wm
+ - xorg-xwayland
- seatd
sources:
- https://github.com/swaywm/wlroots
diff --git a/.builds/freebsd.yml b/.builds/freebsd.yml
index aaa4eb13..f42e895a 100644
--- a/.builds/freebsd.yml
+++ b/.builds/freebsd.yml
@@ -20,6 +20,7 @@ packages:
- x11/xcb-util-errors
- x11/xcb-util-renderutil
- x11/xcb-util-wm
+ - x11-servers/xwayland
- sysutils/seatd
- gmake
sources:
diff --git a/README.md b/README.md
index c0e72270..97e31b6f 100644
--- a/README.md
+++ b/README.md
@@ -56,6 +56,7 @@ Install dependencies:
If you choose to enable X11 support:
+* xwayland (build-time only, optional at runtime)
* xcb
* xcb-composite
* xcb-xfixes
diff --git a/xwayland/meson.build b/xwayland/meson.build
index e7956759..a4b51bf2 100644
--- a/xwayland/meson.build
+++ b/xwayland/meson.build
@@ -18,6 +18,19 @@ if not get_option('xwayland').disabled()
msg += 'Required for Xwayland support.'
endif
+xwayland = dependency('xwayland', required: false)
+if not xwayland.found()
+ # There's no Xwayland release with the pkg-config file shipped yet.
+ xwayland_prog = find_program('Xwayland', required: false)
+ if not xwayland_prog.found()
+ if get_option('xwayland').enabled()
+ error('\n'.join(msg).format('xwayland'))
+ else
+ subdir_done()
+ endif
+ endif
+endif
+
foreach lib : xwayland_required
dep = dependency(lib,
required: get_option('xwayland'),