Commit 9adcf440 authored by Pekka Paalanen's avatar Pekka Paalanen
Browse files

meson: better error for logind deps



Helps people to disable logind support if they do not want the
dependencies.
Signed-off-by: Pekka Paalanen's avatarPekka Paalanen <pq@iki.fi>
parent 2d7a2901
......@@ -122,8 +122,17 @@ if get_option('launcher-logind')
if systemd_dep.found()
config_h.set('HAVE_SYSTEMD_LOGIN_209', '1')
else
systemd_dep = dependency('libsystemd-login', version: '>= 198')
systemd_dep = dependency('libsystemd-login', version: '>= 198', required: false)
if not systemd_dep.found()
error('logind support requires libsystemd or libsystemd-login but neither was found. Or, you can use \'-Dlauncher-logind=false\'')
endif
endif
dbus_dep = dependency('dbus-1', version: '>= 1.6', required: false)
if not dbus_dep.found()
error('logind support requires dbus-1 >= 1.6 which was not found. Or, you can use \'-Dlauncher-logind=false\'')
endif
config_h.set('HAVE_DBUS', '1')
config_h.set('HAVE_SYSTEMD_LOGIN', '1')
......@@ -132,7 +141,7 @@ if get_option('launcher-logind')
'launcher-logind.c',
]
deps_session_helper += [
dependency('dbus-1', version: '>= 1.6'),
dbus_dep,
systemd_dep,
]
endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment