summaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorReza Jelveh <[email protected]>2024-04-15 13:39:41 +0800
committerGitHub <[email protected]>2024-04-15 01:39:41 -0400
commitfb86ed6b0588dfdebfb66ce875bc63cfa0a897f6 (patch)
tree29857a1769107adc58696f08d379f608aa4e29a2 /meson.build
parenta5e79676c4bd22fc5902182acf0667907202a465 (diff)
feat: 1.9 merge (#277)
Co-authored-by: William McKinnon <[email protected]> Co-authored-by: Erik Reider <[email protected]>
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build106
1 files changed, 31 insertions, 75 deletions
diff --git a/meson.build b/meson.build
index 8d43af84..a8142519 100644
--- a/meson.build
+++ b/meson.build
@@ -1,7 +1,7 @@
project(
'sway',
'c',
- version: '0.3.2',
+ version: '0.3.3',
license: 'MIT',
meson_version: '>=0.60.0',
default_options: [
@@ -18,6 +18,7 @@ add_project_arguments(
'-Wno-unused-parameter',
'-Wno-unused-result',
'-Wno-missing-braces',
+ '-Wno-format-zero-length',
'-Wundef',
'-Wvla',
],
@@ -35,14 +36,38 @@ if is_freebsd
add_project_arguments('-D_C11_SOURCE', language: 'c')
endif
+# Execute the scenefx subproject, if any
+subproject(
+ 'scenefx',
+ required: false,
+)
+scenefx = dependency('scenefx')
+
# Execute the wlroots subproject, if any
-wlroots_version = ['>=0.16.0', '<0.17.0']
+wlroots_version = ['>=0.17.0', '<0.18.0']
subproject(
'wlroots',
default_options: ['examples=false'],
required: false,
version: wlroots_version,
)
+wlroots = dependency('wlroots', version: wlroots_version)
+wlroots_features = {
+ 'xwayland': false,
+ 'libinput_backend': false,
+ 'session': false,
+}
+foreach name, _ : wlroots_features
+ var_name = 'have_' + name.underscorify()
+ have = wlroots.get_variable(pkgconfig: var_name, internal: var_name) == 'true'
+ wlroots_features += { name: have }
+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
+
+null_dep = dependency('', required: false)
jsonc = dependency('json-c', version: '>=0.13')
pcre2 = dependency('libpcre2-8')
@@ -52,39 +77,23 @@ 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')
+xkbcommon = dependency('xkbcommon', version: '>=1.5.0')
cairo = dependency('cairo')
pango = dependency('pango')
pangocairo = dependency('pangocairo')
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.21.0')
+libinput = wlroots_features['libinput_backend'] ? dependency('libinput', version: '>=1.21.0') : null_dep
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)
-libudev = dependency('libudev')
-bash_comp = dependency('bash-completion', required: false)
-fish_comp = dependency('fish', required: false)
+libudev = wlroots_features['libinput_backend'] ? dependency('libudev') : null_dep
math = cc.find_library('m')
rt = cc.find_library('rt')
xcb_icccm = dependency('xcb-icccm', required: get_option('xwayland'))
threads = dependency('threads') # for pthread_setschedparam
-wlroots_features = {
- 'xwayland': false,
-}
-foreach name, _ : wlroots_features
- var_name = 'have_' + name.underscorify()
- have = wlroots.get_variable(pkgconfig: var_name, internal: var_name) == 'true'
- wlroots_features += { name: have }
-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 xcb_icccm.found() and wlroots_features['xwayland']
if get_option('sd-bus-provider') == 'auto'
@@ -269,59 +278,7 @@ if get_option('default-wallpaper')
install_data(wallpaper_files, install_dir: wallpaper_install_dir)
endif
-if get_option('zsh-completions')
- zsh_files = files(
- 'completions/zsh/_sway',
- 'completions/zsh/_swaymsg',
- )
- zsh_install_dir = join_paths(datadir, 'zsh', 'site-functions')
-
- install_data(zsh_files, install_dir: zsh_install_dir)
-endif
-
-if get_option('bash-completions')
- bash_files = files(
- 'completions/bash/sway',
- 'completions/bash/swaymsg',
- )
-
- if get_option('swaybar')
- bash_files += files('completions/bash/swaybar')
- endif
-
- if bash_comp.found()
- bash_install_dir = bash_comp.get_variable(
- pkgconfig: 'completionsdir',
- pkgconfig_define: ['datadir', datadir]
- )
- else
- bash_install_dir = join_paths(datadir, 'bash-completion', 'completions')
- endif
-
- install_data(bash_files, install_dir: bash_install_dir)
-endif
-
-if get_option('fish-completions')
- fish_files = files(
- 'completions/fish/sway.fish',
- 'completions/fish/swaymsg.fish',
- )
-
- if get_option('swaynag')
- fish_files += files('completions/fish/swaynag.fish')
- endif
-
- if fish_comp.found()
- fish_install_dir = fish_comp.get_variable(
- pkgconfig: 'completionsdir',
- pkgconfig_define: ['datadir', datadir]
- )
- else
- fish_install_dir = join_paths(datadir, 'fish', 'vendor_completions.d')
- endif
-
- install_data(fish_files, install_dir: fish_install_dir)
-endif
+subdir('completions')
summary({
'xwayland': have_xwayland,
@@ -329,4 +286,3 @@ summary({
'tray': have_tray,
'man-pages': scdoc.found(),
}, bool_yn: true)
-