mirror of
https://gitlab.freedesktop.org/libinput/libei.git
synced 2026-01-11 13:10:17 +01:00
meson: depend on elogind or basu if systemd is missing
systemd isn't portable to non-Linux. However, sd-bus API was extracted into a standalone library that works on BSDs.
This commit is contained in:
parent
35e7ad9717
commit
2a2c4cdd49
2 changed files with 8 additions and 2 deletions
|
|
@ -2,7 +2,7 @@ project('libei', 'c',
|
|||
version: '0.99.1',
|
||||
license: 'MIT',
|
||||
default_options: [ 'c_std=gnu99', 'warning_level=2' ],
|
||||
meson_version: '>= 0.56.0')
|
||||
meson_version: '>= 0.60.0')
|
||||
|
||||
libei_version = meson.project_version().split('.')
|
||||
libei_version_major = libei_version[0].to_int()
|
||||
|
|
@ -83,7 +83,7 @@ dep_libxkbcommon = dependency('xkbcommon', required: false)
|
|||
config_h.set10('HAVE_LIBXKBCOMMON', dep_libxkbcommon.found())
|
||||
dep_libevdev = dependency('libevdev', required: false)
|
||||
config_h.set10('HAVE_LIBEVDEV', dep_libevdev.found())
|
||||
dep_systemd = dependency('libsystemd', required: get_option('liboeffis'))
|
||||
dep_systemd = dependency(['libsystemd', 'libelogind', 'basu'], required: get_option('liboeffis'))
|
||||
|
||||
configure_file(output: 'config.h', configuration: config_h)
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,13 @@
|
|||
|
||||
#include "config.h"
|
||||
|
||||
#if __has_include(<systemd/sd-bus.h>)
|
||||
#include <systemd/sd-bus.h>
|
||||
#elif __has_include(<elogind/sd-bus.h>)
|
||||
#include <elogind/sd-bus.h>
|
||||
#else
|
||||
#include <basu/sd-bus.h>
|
||||
#endif
|
||||
|
||||
#include "util-io.h"
|
||||
#include "util-macros.h"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue