diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 27 |
1 files changed, 21 insertions, 6 deletions
diff --git a/meson.build b/meson.build index 45df8799..53454cdd 100644 --- a/meson.build +++ b/meson.build | |||
@@ -60,17 +60,19 @@ rt = cc.find_library('rt') | |||
60 | git = find_program('git', required: false) | 60 | git = find_program('git', required: false) |
61 | 61 | ||
62 | # Try first to find wlroots as a subproject, then as a system dependency | 62 | # Try first to find wlroots as a subproject, then as a system dependency |
63 | wlroots_version = '>=0.4.1' | ||
63 | wlroots_proj = subproject( | 64 | wlroots_proj = subproject( |
64 | 'wlroots', | 65 | 'wlroots', |
65 | default_options: ['rootston=false', 'examples=false'], | 66 | default_options: ['rootston=false', 'examples=false'], |
66 | required: false, | 67 | required: false, |
68 | version: wlroots_version, | ||
67 | ) | 69 | ) |
68 | if wlroots_proj.found() | 70 | if wlroots_proj.found() |
69 | wlroots = wlroots_proj.get_variable('wlroots') | 71 | wlroots = wlroots_proj.get_variable('wlroots') |
70 | wlroots_conf = wlroots_proj.get_variable('conf_data') | 72 | wlroots_conf = wlroots_proj.get_variable('conf_data') |
71 | wlroots_has_xwayland = wlroots_conf.get('WLR_HAS_XWAYLAND') == 1 | 73 | wlroots_has_xwayland = wlroots_conf.get('WLR_HAS_XWAYLAND') == 1 |
72 | else | 74 | else |
73 | wlroots = dependency('wlroots') | 75 | wlroots = dependency('wlroots', version: wlroots_version) |
74 | wlroots_has_xwayland = cc.get_define('WLR_HAS_XWAYLAND', prefix: '#include <wlr/config.h>', dependencies: wlroots) == '1' | 76 | wlroots_has_xwayland = cc.get_define('WLR_HAS_XWAYLAND', prefix: '#include <wlr/config.h>', dependencies: wlroots) == '1' |
75 | endif | 77 | endif |
76 | 78 | ||
@@ -93,11 +95,6 @@ conf_data.set10('HAVE_SYSTEMD', systemd.found()) | |||
93 | conf_data.set10('HAVE_ELOGIND', elogind.found()) | 95 | conf_data.set10('HAVE_ELOGIND', elogind.found()) |
94 | conf_data.set10('HAVE_TRAY', have_tray) | 96 | conf_data.set10('HAVE_TRAY', have_tray) |
95 | 97 | ||
96 | if not systemd.found() and not elogind.found() | ||
97 | warning('The sway binary must be setuid when compiled without (e)logind') | ||
98 | warning('You must do this manually post-install: chmod a+s /path/to/sway') | ||
99 | endif | ||
100 | |||
101 | scdoc = find_program('scdoc', required: get_option('man-pages')) | 98 | scdoc = find_program('scdoc', required: get_option('man-pages')) |
102 | if scdoc.found() | 99 | if scdoc.found() |
103 | sh = find_program('sh') | 100 | sh = find_program('sh') |
@@ -236,3 +233,21 @@ if get_option('fish-completions') | |||
236 | 233 | ||
237 | install_data(fish_files, install_dir: fish_install_dir) | 234 | install_data(fish_files, install_dir: fish_install_dir) |
238 | endif | 235 | endif |
236 | |||
237 | status = [ | ||
238 | '', | ||
239 | 'Features:', | ||
240 | 'xwayland: @0@'.format(have_xwayland), | ||
241 | 'gdk-pixbuf: @0@'.format(gdk_pixbuf.found()), | ||
242 | 'systemd: @0@'.format(systemd.found()), | ||
243 | 'elogind: @0@'.format(elogind.found()), | ||
244 | 'tray: @0@'.format(have_tray), | ||
245 | 'man-pages: @0@'.format(scdoc.found()), | ||
246 | '', | ||
247 | ] | ||
248 | message('\n'.join(status)) | ||
249 | |||
250 | if not systemd.found() and not elogind.found() | ||
251 | warning('The sway binary must be setuid when compiled without (e)logind') | ||
252 | warning('You must do this manually post-install: chmod a+s /path/to/sway') | ||
253 | endif | ||