summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build34
1 files changed, 16 insertions, 18 deletions
diff --git a/meson.build b/meson.build
index 2a667125..a90f9ba1 100644
--- a/meson.build
+++ b/meson.build
@@ -35,14 +35,24 @@ if is_freebsd
add_project_arguments('-D_C11_SOURCE', language: 'c')
endif
+# Execute the wlroots subproject, if any
+wlroots_version = ['>=0.16.0', '<0.17.0']
+subproject(
+ 'wlroots',
+ default_options: ['examples=false'],
+ required: false,
+ version: wlroots_version,
+)
+
jsonc = dependency('json-c', version: '>=0.13')
-pcre = dependency('libpcre')
-wayland_server = dependency('wayland-server', version: '>=1.20.0')
+pcre2 = dependency('libpcre2-8')
+wayland_server = dependency('wayland-server', version: '>=1.21.0')
wayland_client = dependency('wayland-client')
wayland_cursor = dependency('wayland-cursor')
wayland_egl = dependency('wayland-egl')
egl = dependency('egl')
wayland_protos = dependency('wayland-protocols', version: '>=1.24')
+wlroots = dependency('wlroots', version: wlroots_version)
xkbcommon = dependency('xkbcommon')
cairo = dependency('cairo')
pango = dependency('pango')
@@ -51,7 +61,7 @@ gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: get_option('gdk-pixbuf'))
pixman = dependency('pixman-1')
glesv2 = dependency('glesv2')
libevdev = dependency('libevdev')
-libinput = dependency('libinput', version: '>=1.6.0')
+libinput = dependency('libinput', version: '>=1.21.0')
xcb = dependency('xcb', required: get_option('xwayland'))
drm_full = dependency('libdrm') # only needed for drm_fourcc.h
drm = drm_full.partial_dependency(compile_args: true, includes: true)
@@ -60,20 +70,8 @@ bash_comp = dependency('bash-completion', required: false)
fish_comp = dependency('fish', required: false)
math = cc.find_library('m')
rt = cc.find_library('rt')
-
-# Try first to find wlroots as a subproject, then as a system dependency
-wlroots_version = ['>=0.15.0', '<0.16.0']
-wlroots_proj = subproject(
- 'wlroots',
- default_options: ['examples=false'],
- required: false,
- version: wlroots_version,
-)
-if wlroots_proj.found()
- wlroots = wlroots_proj.get_variable('wlroots')
-else
- wlroots = dependency('wlroots', version: wlroots_version)
-endif
+xcb_icccm = dependency('xcb-icccm', required: get_option('xwayland'))
+threads = dependency('threads') # for pthread_setschedparam
wlroots_features = {
'xwayland': false,
@@ -87,7 +85,7 @@ endforeach
if get_option('xwayland').enabled() and not wlroots_features['xwayland']
error('Cannot enable Xwayland in sway: wlroots has been built without Xwayland support')
endif
-have_xwayland = xcb.found() and wlroots_features['xwayland']
+have_xwayland = xcb.found() and xcb_icccm.found() and wlroots_features['xwayland']
if get_option('sd-bus-provider') == 'auto'
if not get_option('tray').disabled()