summaryrefslogtreecommitdiffstats
path: root/meson.build
diff options
context:
space:
mode:
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build13
1 files changed, 11 insertions, 2 deletions
diff --git a/meson.build b/meson.build
index 253a4e96..de6573ea 100644
--- a/meson.build
+++ b/meson.build
@@ -22,6 +22,10 @@ datadir = get_option('datadir')
22sysconfdir = get_option('sysconfdir') 22sysconfdir = get_option('sysconfdir')
23prefix = get_option('prefix') 23prefix = get_option('prefix')
24 24
25if is_freebsd
26 add_project_arguments('-D_C11_SOURCE', language: 'c')
27endif
28
25swayidle_deps = [] 29swayidle_deps = []
26 30
27jsonc = dependency('json-c', version: '>=0.13') 31jsonc = dependency('json-c', version: '>=0.13')
@@ -40,7 +44,7 @@ gdk_pixbuf = dependency('gdk-pixbuf-2.0', required: false)
40pixman = dependency('pixman-1') 44pixman = dependency('pixman-1')
41libcap = dependency('libcap', required: false) 45libcap = dependency('libcap', required: false)
42libinput = dependency('libinput', version: '>=1.6.0') 46libinput = dependency('libinput', version: '>=1.6.0')
43libpam = cc.find_library('pam') 47libpam = cc.find_library('pam', required: false)
44systemd = dependency('libsystemd', required: false) 48systemd = dependency('libsystemd', required: false)
45elogind = dependency('libelogind', required: false) 49elogind = dependency('libelogind', required: false)
46math = cc.find_library('m') 50math = cc.find_library('m')
@@ -70,6 +74,11 @@ if elogind.found()
70 swayidle_deps += elogind 74 swayidle_deps += elogind
71endif 75endif
72 76
77if not systemd.found() and not elogind.found()
78 warning('The sway binary must be setuid when compiled without (e)logind')
79 warning('You must do this manually post-install: chmod a+s /path/to/sway')
80endif
81
73scdoc = find_program('scdoc', required: false) 82scdoc = find_program('scdoc', required: false)
74 83
75if scdoc.found() 84if scdoc.found()
@@ -133,9 +142,9 @@ subdir('swaymsg')
133subdir('client') 142subdir('client')
134subdir('swaybg') 143subdir('swaybg')
135subdir('swaybar') 144subdir('swaybar')
136subdir('swaylock')
137subdir('swayidle') 145subdir('swayidle')
138subdir('swaynag') 146subdir('swaynag')
147subdir('swaylock')
139 148
140config = configuration_data() 149config = configuration_data()
141config.set('sysconfdir', join_paths(prefix, sysconfdir)) 150config.set('sysconfdir', join_paths(prefix, sysconfdir))