diff options
author | Isaac Freund <ifreund@ifreund.xyz> | 2020-08-08 14:27:36 +0200 |
---|---|---|
committer | Kenny Levinsen <kl@kl.wtf> | 2020-08-08 14:46:14 +0200 |
commit | 48e712ffd9f5982ee03eb3e16c8951a377565c51 (patch) | |
tree | 38b8e6662ce41044757ad04ac69968c34d9a1ce0 /meson.build | |
parent | e57e3e22b9433cca1c7dfb9679d6f4b9653d93ae (diff) |
build: check for libelogind before libsystemd
elogind provides a libsystemd wrapper which is packaged by some distros.
For whatever reason using this wrapper instead of libelogind directly
causes compiler warnings to pop up. Checking for libelogind first
ensures that this wrapper is not used.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/meson.build b/meson.build index 49bd049..e4785d9 100644 --- a/meson.build +++ b/meson.build @@ -98,15 +98,17 @@ endif logind_provider = '' if get_option('logind').enabled() - logind = dependency('libsystemd', required: false) + # Check for libelogind first, as elogind may provide a libsystemd wrapper + # which can cause issues. + logind = dependency('libelogind', required: false) add_project_arguments('-DLOGIND_ENABLED=1', language: 'c') if logind.found() - add_project_arguments('-DHAVE_SYSTEMD=1', language: 'c') - logind_provider = 'systemd' - else - logind = dependency('libelogind') add_project_arguments('-DHAVE_ELOGIND=1', language: 'c') logind_provider = 'elogind' + else + logind = dependency('libsystemd') + add_project_arguments('-DHAVE_SYSTEMD=1', language: 'c') + logind_provider = 'systemd' endif private_files += [ |