build: add basu as sd-bus provider

Based on https://github.com/emersion/mako/commit/805663cc76e0
This commit is contained in:
Jan Beich 2020-12-21 11:25:47 +00:00 committed by Simon Ser
parent 7b7d927cae
commit 4dbeaf3a06
3 changed files with 10 additions and 2 deletions

View file

@ -6,6 +6,8 @@
#include <systemd/sd-bus.h>
#elif HAVE_LIBELOGIND
#include <elogind/sd-bus.h>
#elif HAVE_BASU
#include <basu/sd-bus.h>
#endif
#include "screencast_common.h"

View file

@ -36,10 +36,16 @@ if get_option('sd-bus-provider') == 'auto'
if not sdbus.found()
sdbus = dependency('libelogind',
required: false,
not_found_message: 'libelogind not found, trying basu',
)
endif
if not sdbus.found()
error('Neither libsystemd, nor libelogind was found')
sdbus = dependency('basu',
required: false,
)
endif
if not sdbus.found()
error('Neither libsystemd, nor libelogind, nor basu was found')
endif
else
sdbus = dependency(get_option('sd-bus-provider'))

View file

@ -1,2 +1,2 @@
option('sd-bus-provider', type: 'combo', choices: ['auto', 'libsystemd', 'libelogind'], value: 'auto', description: 'Provider of the sd-bus library')
option('sd-bus-provider', type: 'combo', choices: ['auto', 'libsystemd', 'libelogind', 'basu'], value: 'auto', description: 'Provider of the sd-bus library')
option('systemd', type: 'feature', value: 'auto', description: 'Install systemd user service unit')