aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2024-05-18 14:02:14 +0200
committerLibravatar Simon Zeni <simon@bl4ckb0ne.ca>2024-05-21 11:44:39 -0400
commit970415241497ceccfb013b6f8cb2395abee74e5c (patch)
tree4943b3c8e2794146f74e5f6871865c2231231f7a /meson.build
parentsway/config/output.c: fix null deref on output config (diff)
downloadsway-970415241497ceccfb013b6f8cb2395abee74e5c.tar.gz
sway-970415241497ceccfb013b6f8cb2395abee74e5c.tar.zst
sway-970415241497ceccfb013b6f8cb2395abee74e5c.zip
build: drop xwayland option
Instead of having a build-time option to enable/disable xwayland support, just use the wlroots build config: enable xwayland in Sway if it was enabled when building wlroots. I don't see any use-case for disabling xwayland in Sway when enabled in wlroots: Sway doesn't pull in any additional dependency (just pulls in dependencies that wlroots already needs). We have a config command to disable xwayland at runtime anyways. This makes it so xwayland behaves the same way as other features such as libinput backend and session support. This also reduces the build matrix (less combinations of build options). I think we originally introduced the xwayland option when we didn't have a good way to figure out the wlroots build config from the Sway build system.
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build12
1 files changed, 2 insertions, 10 deletions
diff --git a/meson.build b/meson.build
index 1d143110..3c444e07 100644
--- a/meson.build
+++ b/meson.build
@@ -57,10 +57,6 @@ foreach name, _ : wlroots_features
57 wlroots_features += { name: have } 57 wlroots_features += { name: have }
58endforeach 58endforeach
59 59
60if get_option('xwayland').enabled() and not wlroots_features['xwayland']
61 error('Cannot enable Xwayland in sway: wlroots has been built without Xwayland support')
62endif
63
64null_dep = dependency('', required: false) 60null_dep = dependency('', required: false)
65 61
66jsonc = dependency('json-c', version: '>=0.13') 62jsonc = dependency('json-c', version: '>=0.13')
@@ -77,16 +73,14 @@ gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: get_option('gdk-pixbuf'))
77pixman = dependency('pixman-1') 73pixman = dependency('pixman-1')
78libevdev = dependency('libevdev') 74libevdev = dependency('libevdev')
79libinput = wlroots_features['libinput_backend'] ? dependency('libinput', version: '>=1.21.0') : null_dep 75libinput = wlroots_features['libinput_backend'] ? dependency('libinput', version: '>=1.21.0') : null_dep
80xcb = dependency('xcb', required: get_option('xwayland')) 76xcb = wlroots_features['xwayland'] ? dependency('xcb') : null_dep
81drm = dependency('libdrm') 77drm = dependency('libdrm')
82libudev = wlroots_features['libinput_backend'] ? dependency('libudev') : null_dep 78libudev = wlroots_features['libinput_backend'] ? dependency('libudev') : null_dep
83math = cc.find_library('m') 79math = cc.find_library('m')
84rt = cc.find_library('rt') 80rt = cc.find_library('rt')
85xcb_icccm = dependency('xcb-icccm', required: get_option('xwayland')) 81xcb_icccm = wlroots_features['xwayland'] ? dependency('xcb-icccm') : null_dep
86threads = dependency('threads') # for pthread_setschedparam 82threads = dependency('threads') # for pthread_setschedparam
87 83
88have_xwayland = xcb.found() and xcb_icccm.found() and wlroots_features['xwayland']
89
90if get_option('sd-bus-provider') == 'auto' 84if get_option('sd-bus-provider') == 'auto'
91 if not get_option('tray').disabled() 85 if not get_option('tray').disabled()
92 assert(get_option('auto_features').auto(), 'sd-bus-provider must not be set to auto since auto_features != auto') 86 assert(get_option('auto_features').auto(), 'sd-bus-provider must not be set to auto since auto_features != auto')
@@ -110,7 +104,6 @@ have_tray = (not get_option('tray').disabled()) and tray_deps_found
110 104
111conf_data = configuration_data() 105conf_data = configuration_data()
112 106
113conf_data.set10('HAVE_XWAYLAND', have_xwayland)
114conf_data.set10('HAVE_GDK_PIXBUF', gdk_pixbuf.found()) 107conf_data.set10('HAVE_GDK_PIXBUF', gdk_pixbuf.found())
115conf_data.set10('HAVE_LIBSYSTEMD', sdbus.found() and sdbus.name() == 'libsystemd') 108conf_data.set10('HAVE_LIBSYSTEMD', sdbus.found() and sdbus.name() == 'libsystemd')
116conf_data.set10('HAVE_LIBELOGIND', sdbus.found() and sdbus.name() == 'libelogind') 109conf_data.set10('HAVE_LIBELOGIND', sdbus.found() and sdbus.name() == 'libelogind')
@@ -271,7 +264,6 @@ endif
271subdir('completions') 264subdir('completions')
272 265
273summary({ 266summary({
274 'xwayland': have_xwayland,
275 'gdk-pixbuf': gdk_pixbuf.found(), 267 'gdk-pixbuf': gdk_pixbuf.found(),
276 'tray': have_tray, 268 'tray': have_tray,
277 'man-pages': scdoc.found(), 269 'man-pages': scdoc.found(),