build: disable logind on -Dauto_features=disabled -Dlogind=auto

Setting auto_features=disabled is supposed to disable all optional
dependencies. Since we aren't using a feature option here, we need
to manually add logic to disable logind in this case.
This commit is contained in:
Simon Ser 2021-04-10 09:05:05 +02:00 committed by Kenny Levinsen
parent 753c5276cf
commit 5884a6003a

View file

@ -114,7 +114,9 @@ endif
logind = disabler()
logind_provider = ''
if get_option('logind') != 'disabled'
if get_option('logind') == 'auto'
if get_option('logind') == 'auto' and get_option('auto_features').disabled()
# Disable logind
elif get_option('logind') == 'auto'
assert(get_option('auto_features').auto(), '-Dlogind must be set to systemd or elogind since auto_features != auto')
foreach logind_provider : ['elogind', 'systemd']
logind = dependency('lib@0@'.format(logind_provider), required: false)