meson: add support for compiling module-logind with elogind

Closes #71
This commit is contained in:
Enrean Rean 2021-10-15 13:36:30 +00:00 committed by George Kiagiadakis
parent 4ab119778a
commit 477fc744de
3 changed files with 8 additions and 3 deletions

View file

@ -81,8 +81,10 @@ summary({'Lua version': lua_dep.version() + (system_lua ? ' (system)' : ' (built
systemd = dependency('systemd', required: get_option('systemd'))
libsystemd_dep = dependency('libsystemd',required: get_option('systemd'))
libelogind_dep = dependency('libelogind', required: get_option('elogind'))
summary({'systemd conf data': systemd.found(),
'libsystemd': libsystemd_dep.found()}, bool_yn: true)
'libsystemd': libsystemd_dep.found(),
'libelogind': libelogind_dep.found()}, bool_yn: true)
gnome = import('gnome')
pkgconfig = import('pkgconfig')

View file

@ -7,6 +7,9 @@ option('system-lua', type : 'boolean', value : 'false',
option('system-lua-version',
type: 'string', value : 'auto',
description: 'The system lua version to use or "auto" for auto-detection')
option('elogind',
type: 'feature', value : 'auto',
description: 'Enable elogind integration')
option('systemd',
type: 'feature', value: 'auto',
description: 'Enable installing systemd units & logind integration')

View file

@ -188,7 +188,7 @@ shared_library(
dependencies : [wp_dep, pipewire_dep],
)
if libsystemd_dep.found()
if libsystemd_dep.found() or libelogind_dep.found()
shared_library(
'wireplumber-module-logind',
[
@ -197,6 +197,6 @@ if libsystemd_dep.found()
c_args : [common_c_args, '-DG_LOG_DOMAIN="m-logind"'],
install : true,
install_dir : wireplumber_module_dir,
dependencies : [wp_dep, pipewire_dep, libsystemd_dep],
dependencies : [wp_dep, pipewire_dep, libsystemd_dep, libelogind_dep],
)
endif