diff --git a/meson.build b/meson.build index 3495f8fd..28bcfcd1 100644 --- a/meson.build +++ b/meson.build @@ -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') diff --git a/meson_options.txt b/meson_options.txt index 4c86bd12..163757cc 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -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') diff --git a/modules/meson.build b/modules/meson.build index f1c6f486..d19404d1 100644 --- a/modules/meson.build +++ b/modules/meson.build @@ -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