summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build26
1 files changed, 5 insertions, 21 deletions
diff --git a/meson.build b/meson.build
index bb60bc89..bffbe312 100644
--- a/meson.build
+++ b/meson.build
@@ -32,8 +32,6 @@ if is_freebsd
32 add_project_arguments('-D_C11_SOURCE', language: 'c') 32 add_project_arguments('-D_C11_SOURCE', language: 'c')
33endif 33endif
34 34
35swayidle_deps = []
36
37jsonc = dependency('json-c', version: '>=0.13') 35jsonc = dependency('json-c', version: '>=0.13')
38pcre = dependency('libpcre') 36pcre = dependency('libpcre')
39wlroots = dependency('wlroots', fallback: ['wlroots', 'wlroots']) 37wlroots = dependency('wlroots', fallback: ['wlroots', 'wlroots'])
@@ -48,6 +46,7 @@ pango = dependency('pango')
48pangocairo = dependency('pangocairo') 46pangocairo = dependency('pangocairo')
49gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: false) 47gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: false)
50pixman = dependency('pixman-1') 48pixman = dependency('pixman-1')
49libevdev = dependency('libevdev')
51libinput = dependency('libinput', version: '>=1.6.0') 50libinput = dependency('libinput', version: '>=1.6.0')
52libpam = cc.find_library('pam', required: false) 51libpam = cc.find_library('pam', required: false)
53crypt = cc.find_library('crypt', required: false) 52crypt = cc.find_library('crypt', required: false)
@@ -67,6 +66,7 @@ endif
67conf_data.set10('HAVE_GDK_PIXBUF', gdk_pixbuf.found()) 66conf_data.set10('HAVE_GDK_PIXBUF', gdk_pixbuf.found())
68conf_data.set10('HAVE_SYSTEMD', systemd.found()) 67conf_data.set10('HAVE_SYSTEMD', systemd.found())
69conf_data.set10('HAVE_ELOGIND', elogind.found()) 68conf_data.set10('HAVE_ELOGIND', elogind.found())
69conf_data.set10('HAVE_TRAY', get_option('enable-tray') and (systemd.found() or elogind.found()))
70 70
71if not systemd.found() and not elogind.found() 71if not systemd.found() and not elogind.found()
72 warning('The sway binary must be setuid when compiled without (e)logind') 72 warning('The sway binary must be setuid when compiled without (e)logind')
@@ -86,7 +86,6 @@ if scdoc.found()
86 'sway/sway-output.5.scd', 86 'sway/sway-output.5.scd',
87 'swaylock/swaylock.1.scd', 87 'swaylock/swaylock.1.scd',
88 'swaymsg/swaymsg.1.scd', 88 'swaymsg/swaymsg.1.scd',
89 'swayidle/swayidle.1.scd',
90 'swaynag/swaynag.1.scd', 89 'swaynag/swaynag.1.scd',
91 'swaynag/swaynag.5.scd', 90 'swaynag/swaynag.5.scd',
92 ] 91 ]
@@ -108,13 +107,7 @@ if scdoc.found()
108 endforeach 107 endforeach
109endif 108endif
110 109
111# If prefix is '/usr', sysconfdir will be explicitly set to '/etc' by Meson to 110add_project_arguments('-DSYSCONFDIR="/@0@"'.format(join_paths(prefix, sysconfdir)), language : 'c')
112# enforce FHS compliance, so we should look for configs there as well.
113if prefix == '/usr'
114 add_project_arguments('-DSYSCONFDIR="/@0@"'.format(sysconfdir), language : 'c')
115else
116 add_project_arguments('-DSYSCONFDIR="/@0@/@1@"'.format(prefix, sysconfdir), language : 'c')
117endif
118 111
119version = get_option('sway-version') 112version = get_option('sway-version')
120if version != '' 113if version != ''
@@ -152,21 +145,13 @@ subdir('swaymsg')
152subdir('client') 145subdir('client')
153subdir('swaybg') 146subdir('swaybg')
154subdir('swaybar') 147subdir('swaybar')
155subdir('swayidle')
156subdir('swaynag') 148subdir('swaynag')
157subdir('swaylock') 149subdir('swaylock')
158 150
159config = configuration_data() 151config = configuration_data()
160config.set('datadir', join_paths(prefix, datadir)) 152config.set('datadir', join_paths(prefix, datadir))
161config.set('prefix', prefix) 153config.set('prefix', prefix)
162 154config.set('sysconfdir', join_paths(prefix, sysconfdir))
163# If prefix is '/usr', sysconfdir will be explicitly set to '/etc' by Meson to
164# enforce FHS compliance, so we should look for configs there as well.
165if prefix == '/usr'
166 config.set('sysconfdir', sysconfdir)
167else
168 config.set('sysconfdir', join_paths(prefix, sysconfdir))
169endif
170 155
171configure_file( 156configure_file(
172 configuration: config, 157 configuration: config,
@@ -226,7 +211,7 @@ endif
226if (get_option('bash-completions')) 211if (get_option('bash-completions'))
227 bash_files = files( 212 bash_files = files(
228 'completions/bash/sway', 213 'completions/bash/sway',
229 'completions/bash/swayidle', 214 'completions/bash/swaybar',
230 'completions/bash/swaylock', 215 'completions/bash/swaylock',
231 'completions/bash/swaymsg', 216 'completions/bash/swaymsg',
232 ) 217 )
@@ -238,7 +223,6 @@ endif
238if (get_option('fish-completions')) 223if (get_option('fish-completions'))
239 fish_files = files( 224 fish_files = files(
240 'completions/fish/sway.fish', 225 'completions/fish/sway.fish',
241 'completions/fish/swayidle.fish',
242 'completions/fish/swaylock.fish', 226 'completions/fish/swaylock.fish',
243 'completions/fish/swaymsg.fish', 227 'completions/fish/swaymsg.fish',
244 'completions/fish/swaynag.fish', 228 'completions/fish/swaynag.fish',