aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dylan Araps <dylan.araps@gmail.com>2021-07-13 15:19:42 +0300
committerLibravatar Simon Ser <contact@emersion.fr>2021-07-21 18:24:09 +0200
commit2024725cc0a38b3db3cb10f67ee4dc750b7feb3a (patch)
tree8544f62dd6f362932a6a963c8ac2f5cfc6991c88
parentgrimshot: Exit 1 on cancellation (diff)
downloadsway-2024725cc0a38b3db3cb10f67ee4dc750b7feb3a.tar.gz
sway-2024725cc0a38b3db3cb10f67ee4dc750b7feb3a.tar.zst
sway-2024725cc0a38b3db3cb10f67ee4dc750b7feb3a.zip
Add meson options to enable/disable swaybar and swaynag
-rw-r--r--meson.build34
-rw-r--r--meson_options.txt2
2 files changed, 29 insertions, 7 deletions
diff --git a/meson.build b/meson.build
index 6461ff1b..756857b7 100644
--- a/meson.build
+++ b/meson.build
@@ -140,9 +140,15 @@ if scdoc.found()
140 'sway/sway-output.5.scd', 140 'sway/sway-output.5.scd',
141 'swaybar/swaybar-protocol.7.scd', 141 'swaybar/swaybar-protocol.7.scd',
142 'swaymsg/swaymsg.1.scd', 142 'swaymsg/swaymsg.1.scd',
143 'swaynag/swaynag.1.scd',
144 'swaynag/swaynag.5.scd',
145 ] 143 ]
144
145 if get_option('swaynag')
146 man_files += [
147 'swaynag/swaynag.1.scd',
148 'swaynag/swaynag.5.scd',
149 ]
150 endif
151
146 foreach filename : man_files 152 foreach filename : man_files
147 topic = filename.split('.')[-3].split('/')[-1] 153 topic = filename.split('.')[-3].split('/')[-1]
148 section = filename.split('.')[-2] 154 section = filename.split('.')[-2]
@@ -224,9 +230,15 @@ subdir('common')
224subdir('sway') 230subdir('sway')
225subdir('swaymsg') 231subdir('swaymsg')
226 232
227subdir('client') 233if get_option('swaybar') or get_option('swaynag')
228subdir('swaybar') 234 subdir('client')
229subdir('swaynag') 235endif
236if get_option('swaybar')
237 subdir('swaybar')
238endif
239if get_option('swaynag')
240 subdir('swaynag')
241endif
230 242
231config = configuration_data() 243config = configuration_data()
232config.set('datadir', join_paths(prefix, datadir)) 244config.set('datadir', join_paths(prefix, datadir))
@@ -274,9 +286,13 @@ endif
274if get_option('bash-completions') 286if get_option('bash-completions')
275 bash_files = files( 287 bash_files = files(
276 'completions/bash/sway', 288 'completions/bash/sway',
277 'completions/bash/swaybar',
278 'completions/bash/swaymsg', 289 'completions/bash/swaymsg',
279 ) 290 )
291
292 if get_option('swaybar')
293 bash_files += files('completions/bash/swaybar')
294 endif
295
280 if bash_comp.found() 296 if bash_comp.found()
281 bash_install_dir = bash_comp.get_variable( 297 bash_install_dir = bash_comp.get_variable(
282 pkgconfig: 'completionsdir', 298 pkgconfig: 'completionsdir',
@@ -293,8 +309,12 @@ if get_option('fish-completions')
293 fish_files = files( 309 fish_files = files(
294 'completions/fish/sway.fish', 310 'completions/fish/sway.fish',
295 'completions/fish/swaymsg.fish', 311 'completions/fish/swaymsg.fish',
296 'completions/fish/swaynag.fish',
297 ) 312 )
313
314 if get_option('swaynag')
315 fish_files += files('completions/fish/swaynag.fish')
316 endif
317
298 if fish_comp.found() 318 if fish_comp.found()
299 fish_install_dir = fish_comp.get_variable( 319 fish_install_dir = fish_comp.get_variable(
300 pkgconfig: 'completionsdir', 320 pkgconfig: 'completionsdir',
diff --git a/meson_options.txt b/meson_options.txt
index e36900b6..6ba67554 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -2,6 +2,8 @@ option('default-wallpaper', type: 'boolean', value: true, description: 'Install
2option('zsh-completions', type: 'boolean', value: true, description: 'Install zsh shell completions.') 2option('zsh-completions', type: 'boolean', value: true, description: 'Install zsh shell completions.')
3option('bash-completions', type: 'boolean', value: true, description: 'Install bash shell completions.') 3option('bash-completions', type: 'boolean', value: true, description: 'Install bash shell completions.')
4option('fish-completions', type: 'boolean', value: true, description: 'Install fish shell completions.') 4option('fish-completions', type: 'boolean', value: true, description: 'Install fish shell completions.')
5option('swaybar', type: 'boolean', value: true, description: 'Enable support for swaybar')
6option('swaynag', type: 'boolean', value: true, description: 'Enable support for swaynag')
5option('xwayland', type: 'feature', value: 'auto', description: 'Enable support for X11 applications') 7option('xwayland', type: 'feature', value: 'auto', description: 'Enable support for X11 applications')
6option('tray', type: 'feature', value: 'auto', description: 'Enable support for swaybar tray') 8option('tray', type: 'feature', value: 'auto', description: 'Enable support for swaybar tray')
7option('gdk-pixbuf', type: 'feature', value: 'auto', description: 'Enable support for more image formats in swaybg') 9option('gdk-pixbuf', type: 'feature', value: 'auto', description: 'Enable support for more image formats in swaybg')