aboutsummaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
authorLibravatar Simon Ser <contact@emersion.fr>2022-11-28 20:07:07 +0100
committerLibravatar Simon Zeni <simon@bl4ckb0ne.ca>2022-11-28 18:51:45 -0500
commita358d6760ef751588d310f0141798387e7f4d4b1 (patch)
treea174bb8e6f9dbdd9c58e07381a188c70a8301b7e /meson.build
parentFix build on Debian Stable (diff)
downloadsway-a358d6760ef751588d310f0141798387e7f4d4b1.tar.gz
sway-a358d6760ef751588d310f0141798387e7f4d4b1.tar.zst
sway-a358d6760ef751588d310f0141798387e7f4d4b1.zip
build: move completions to separate file
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build56
1 files changed, 1 insertions, 55 deletions
diff --git a/meson.build b/meson.build
index eb3229cf..e22bc36e 100644
--- a/meson.build
+++ b/meson.build
@@ -81,8 +81,6 @@ xcb = dependency('xcb', required: get_option('xwayland'))
81drm_full = dependency('libdrm') # only needed for drm_fourcc.h 81drm_full = dependency('libdrm') # only needed for drm_fourcc.h
82drm = drm_full.partial_dependency(compile_args: true, includes: true) 82drm = drm_full.partial_dependency(compile_args: true, includes: true)
83libudev = wlroots_features['libinput_backend'] ? dependency('libudev') : null_dep 83libudev = wlroots_features['libinput_backend'] ? dependency('libudev') : null_dep
84bash_comp = dependency('bash-completion', required: false)
85fish_comp = dependency('fish', required: false)
86math = cc.find_library('m') 84math = cc.find_library('m')
87rt = cc.find_library('rt') 85rt = cc.find_library('rt')
88xcb_icccm = dependency('xcb-icccm', required: get_option('xwayland')) 86xcb_icccm = dependency('xcb-icccm', required: get_option('xwayland'))
@@ -266,59 +264,7 @@ if get_option('default-wallpaper')
266 install_data(wallpaper_files, install_dir: wallpaper_install_dir) 264 install_data(wallpaper_files, install_dir: wallpaper_install_dir)
267endif 265endif
268 266
269if get_option('zsh-completions') 267subdir('completions')
270 zsh_files = files(
271 'completions/zsh/_sway',
272 'completions/zsh/_swaymsg',
273 )
274 zsh_install_dir = join_paths(datadir, 'zsh', 'site-functions')
275
276 install_data(zsh_files, install_dir: zsh_install_dir)
277endif
278
279if get_option('bash-completions')
280 bash_files = files(
281 'completions/bash/sway',
282 'completions/bash/swaymsg',
283 )
284
285 if get_option('swaybar')
286 bash_files += files('completions/bash/swaybar')
287 endif
288
289 if bash_comp.found()
290 bash_install_dir = bash_comp.get_variable(
291 pkgconfig: 'completionsdir',
292 pkgconfig_define: ['datadir', datadir]
293 )
294 else
295 bash_install_dir = join_paths(datadir, 'bash-completion', 'completions')
296 endif
297
298 install_data(bash_files, install_dir: bash_install_dir)
299endif
300
301if get_option('fish-completions')
302 fish_files = files(
303 'completions/fish/sway.fish',
304 'completions/fish/swaymsg.fish',
305 )
306
307 if get_option('swaynag')
308 fish_files += files('completions/fish/swaynag.fish')
309 endif
310
311 if fish_comp.found()
312 fish_install_dir = fish_comp.get_variable(
313 pkgconfig: 'completionsdir',
314 pkgconfig_define: ['datadir', datadir]
315 )
316 else
317 fish_install_dir = join_paths(datadir, 'fish', 'vendor_completions.d')
318 endif
319
320 install_data(fish_files, install_dir: fish_install_dir)
321endif
322 268
323summary({ 269summary({
324 'xwayland': have_xwayland, 270 'xwayland': have_xwayland,