aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build17
1 files changed, 5 insertions, 12 deletions
diff --git a/meson.build b/meson.build
index f8bf4f80..eb66506a 100644
--- a/meson.build
+++ b/meson.build
@@ -14,6 +14,7 @@ project(
14add_project_arguments( 14add_project_arguments(
15 [ 15 [
16 '-DWLR_USE_UNSTABLE', 16 '-DWLR_USE_UNSTABLE',
17 '-D_POSIX_C_SOURCE=200809L',
17 18
18 '-Wno-unused-parameter', 19 '-Wno-unused-parameter',
19 '-Wno-unused-result', 20 '-Wno-unused-result',
@@ -44,7 +45,7 @@ subproject(
44 required: false, 45 required: false,
45 version: wlroots_version, 46 version: wlroots_version,
46) 47)
47wlroots = dependency('wlroots', version: wlroots_version) 48wlroots = dependency('wlroots-0.18', version: wlroots_version, fallback: 'wlroots')
48wlroots_features = { 49wlroots_features = {
49 'xwayland': false, 50 'xwayland': false,
50 'libinput_backend': false, 51 'libinput_backend': false,
@@ -56,10 +57,6 @@ foreach name, _ : wlroots_features
56 wlroots_features += { name: have } 57 wlroots_features += { name: have }
57endforeach 58endforeach
58 59
59if get_option('xwayland').enabled() and not wlroots_features['xwayland']
60 error('Cannot enable Xwayland in sway: wlroots has been built without Xwayland support')
61endif
62
63null_dep = dependency('', required: false) 60null_dep = dependency('', required: false)
64 61
65jsonc = dependency('json-c', version: '>=0.13') 62jsonc = dependency('json-c', version: '>=0.13')
@@ -67,7 +64,7 @@ pcre2 = dependency('libpcre2-8')
67wayland_server = dependency('wayland-server', version: '>=1.21.0') 64wayland_server = dependency('wayland-server', version: '>=1.21.0')
68wayland_client = dependency('wayland-client') 65wayland_client = dependency('wayland-client')
69wayland_cursor = dependency('wayland-cursor') 66wayland_cursor = dependency('wayland-cursor')
70wayland_protos = dependency('wayland-protocols', version: '>=1.24') 67wayland_protos = dependency('wayland-protocols', version: '>=1.24', default_options: ['tests=false'])
71xkbcommon = dependency('xkbcommon', version: '>=1.5.0') 68xkbcommon = dependency('xkbcommon', version: '>=1.5.0')
72cairo = dependency('cairo') 69cairo = dependency('cairo')
73pango = dependency('pango') 70pango = dependency('pango')
@@ -76,16 +73,14 @@ gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: get_option('gdk-pixbuf'))
76pixman = dependency('pixman-1') 73pixman = dependency('pixman-1')
77libevdev = dependency('libevdev') 74libevdev = dependency('libevdev')
78libinput = 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
79xcb = dependency('xcb', required: get_option('xwayland')) 76xcb = wlroots_features['xwayland'] ? dependency('xcb') : null_dep
80drm = dependency('libdrm') 77drm = dependency('libdrm')
81libudev = wlroots_features['libinput_backend'] ? dependency('libudev') : null_dep 78libudev = wlroots_features['libinput_backend'] ? dependency('libudev') : null_dep
82math = cc.find_library('m') 79math = cc.find_library('m')
83rt = cc.find_library('rt') 80rt = cc.find_library('rt')
84xcb_icccm = dependency('xcb-icccm', required: get_option('xwayland')) 81xcb_icccm = wlroots_features['xwayland'] ? dependency('xcb-icccm') : null_dep
85threads = dependency('threads') # for pthread_setschedparam 82threads = dependency('threads') # for pthread_setschedparam
86 83
87have_xwayland = xcb.found() and xcb_icccm.found() and wlroots_features['xwayland']
88
89if get_option('sd-bus-provider') == 'auto' 84if get_option('sd-bus-provider') == 'auto'
90 if not get_option('tray').disabled() 85 if not get_option('tray').disabled()
91 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')
@@ -109,7 +104,6 @@ have_tray = (not get_option('tray').disabled()) and tray_deps_found
109 104
110conf_data = configuration_data() 105conf_data = configuration_data()
111 106
112conf_data.set10('HAVE_XWAYLAND', have_xwayland)
113conf_data.set10('HAVE_GDK_PIXBUF', gdk_pixbuf.found()) 107conf_data.set10('HAVE_GDK_PIXBUF', gdk_pixbuf.found())
114conf_data.set10('HAVE_LIBSYSTEMD', sdbus.found() and sdbus.name() == 'libsystemd') 108conf_data.set10('HAVE_LIBSYSTEMD', sdbus.found() and sdbus.name() == 'libsystemd')
115conf_data.set10('HAVE_LIBELOGIND', sdbus.found() and sdbus.name() == 'libelogind') 109conf_data.set10('HAVE_LIBELOGIND', sdbus.found() and sdbus.name() == 'libelogind')
@@ -270,7 +264,6 @@ endif
270subdir('completions') 264subdir('completions')
271 265
272summary({ 266summary({
273 'xwayland': have_xwayland,
274 'gdk-pixbuf': gdk_pixbuf.found(), 267 'gdk-pixbuf': gdk_pixbuf.found(),
275 'tray': have_tray, 268 'tray': have_tray,
276 'man-pages': scdoc.found(), 269 'man-pages': scdoc.found(),