aboutsummaryrefslogtreecommitdiff
path: root/meson.build
diff options
context:
space:
mode:
authorDrew DeVault <sir@cmpwn.com>2018-11-18 08:22:25 -0500
committerGitHub <noreply@github.com>2018-11-18 08:22:25 -0500
commitb87250425fe13149e41b346f15c5cf808f376438 (patch)
tree145fcb048cc3df3d04a8b6afb90de68dd2dd80a9 /meson.build
parenteda3bfeed5097c71634332bfe998188b028abf02 (diff)
parentcad851805bea6b4777685df1c6adf8cb9fa71835 (diff)
Merge pull request #3147 from emersion/set10
Use #if instead of #ifdef
Diffstat (limited to 'meson.build')
-rw-r--r--meson.build24
1 files changed, 6 insertions, 18 deletions
diff --git a/meson.build b/meson.build
index 8327b763..bb60bc89 100644
--- a/meson.build
+++ b/meson.build
@@ -59,30 +59,18 @@ git = find_program('git', required: false)
conf_data = configuration_data()
+conf_data.set10('HAVE_XWAYLAND', get_option('enable-xwayland'))
if get_option('enable-xwayland')
- conf_data.set('HAVE_XWAYLAND', true)
xcb = dependency('xcb')
-else
- conf_data.set('HAVE_XWAYLAND', false)
-endif
-
-if gdk_pixbuf.found()
- conf_data.set('HAVE_GDK_PIXBUF', true)
endif
-if systemd.found()
- conf_data.set('SWAY_IDLE_HAS_SYSTEMD', true)
- swayidle_deps += systemd
-endif
-
-if elogind.found()
- conf_data.set('SWAY_IDLE_HAS_ELOGIND', true)
- swayidle_deps += elogind
-endif
+conf_data.set10('HAVE_GDK_PIXBUF', gdk_pixbuf.found())
+conf_data.set10('HAVE_SYSTEMD', systemd.found())
+conf_data.set10('HAVE_ELOGIND', elogind.found())
if not systemd.found() and not elogind.found()
- warning('The sway binary must be setuid when compiled without (e)logind')
- warning('You must do this manually post-install: chmod a+s /path/to/sway')
+ warning('The sway binary must be setuid when compiled without (e)logind')
+ warning('You must do this manually post-install: chmod a+s /path/to/sway')
endif
scdoc = find_program('scdoc', required: false)