diff options
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/meson.build b/meson.build index a1f406ec..b943236f 100644 --- a/meson.build +++ b/meson.build | |||
@@ -20,6 +20,8 @@ datadir = get_option('datadir') | |||
20 | sysconfdir = get_option('sysconfdir') | 20 | sysconfdir = get_option('sysconfdir') |
21 | prefix = get_option('prefix') | 21 | prefix = get_option('prefix') |
22 | 22 | ||
23 | swayidle_deps = [] | ||
24 | |||
23 | jsonc = dependency('json-c', version: '>=0.13') | 25 | jsonc = dependency('json-c', version: '>=0.13') |
24 | pcre = dependency('libpcre') | 26 | pcre = dependency('libpcre') |
25 | wlroots = dependency('wlroots', fallback: ['wlroots', 'wlroots']) | 27 | wlroots = dependency('wlroots', fallback: ['wlroots', 'wlroots']) |
@@ -37,6 +39,8 @@ pixman = dependency('pixman-1') | |||
37 | libcap = dependency('libcap') | 39 | libcap = dependency('libcap') |
38 | libinput = dependency('libinput', version: '>=1.6.0') | 40 | libinput = dependency('libinput', version: '>=1.6.0') |
39 | libpam = cc.find_library('pam') | 41 | libpam = cc.find_library('pam') |
42 | systemd = dependency('libsystemd', required: false) | ||
43 | elogind = dependency('libelogind', required: false) | ||
40 | math = cc.find_library('m') | 44 | math = cc.find_library('m') |
41 | rt = cc.find_library('rt') | 45 | rt = cc.find_library('rt') |
42 | git = find_program('git', required: false) | 46 | git = find_program('git', required: false) |
@@ -47,6 +51,16 @@ if gdk_pixbuf.found() | |||
47 | conf_data.set('HAVE_GDK_PIXBUF', true) | 51 | conf_data.set('HAVE_GDK_PIXBUF', true) |
48 | endif | 52 | endif |
49 | 53 | ||
54 | if systemd.found() | ||
55 | conf_data.set('SWAY_IDLE_HAS_SYSTEMD', true) | ||
56 | swayidle_deps += systemd | ||
57 | endif | ||
58 | |||
59 | if elogind.found() | ||
60 | conf_data.set('SWAY_IDLE_HAS_ELOGIND', true) | ||
61 | swayidle_deps += elogind | ||
62 | endif | ||
63 | |||
50 | scdoc = find_program('scdoc', required: false) | 64 | scdoc = find_program('scdoc', required: false) |
51 | 65 | ||
52 | if scdoc.found() | 66 | if scdoc.found() |
@@ -59,6 +73,7 @@ if scdoc.found() | |||
59 | 'sway/sway-input.5.scd', | 73 | 'sway/sway-input.5.scd', |
60 | 'swaylock/swaylock.1.scd', | 74 | 'swaylock/swaylock.1.scd', |
61 | 'swaymsg/swaymsg.1.scd', | 75 | 'swaymsg/swaymsg.1.scd', |
76 | 'swayidle/swayidle.1.scd', | ||
62 | ] | 77 | ] |
63 | foreach filename : man_files | 78 | foreach filename : man_files |
64 | topic = filename.split('.')[-3].split('/')[-1] | 79 | topic = filename.split('.')[-3].split('/')[-1] |
@@ -106,6 +121,7 @@ subdir('client') | |||
106 | subdir('swaybg') | 121 | subdir('swaybg') |
107 | subdir('swaybar') | 122 | subdir('swaybar') |
108 | subdir('swaylock') | 123 | subdir('swaylock') |
124 | subdir('swayidle') | ||
109 | 125 | ||
110 | config = configuration_data() | 126 | config = configuration_data() |
111 | config.set('sysconfdir', join_paths(prefix, sysconfdir)) | 127 | config.set('sysconfdir', join_paths(prefix, sysconfdir)) |