spiegel-keyman/linux/keyman-system-service/meson.build
Eberhard Beilharz 80ae8e6289
chore(linux): improve compatibility with Gentoo Linux 🍒
Gentoo doesn't use systemd. `libelogind` or `basu` implement some aspects
of systemd, so we use that on Gentoo (or rather when `libsystemd` is not
available but `libelogind` or `basu` is).

Patch from https://forums.gentoo.org/viewtopic.php?p=8850566.
See also https://community.software.sil.org/t/keyman-for-gentoo-linux/9615.

Cherry-pick-of: #12889
2025-01-29 09:18:22 +01:00

24 lines
669 B
Meson

project('keyman-system-service', 'c', 'cpp',
version: run_command('cat', '../../VERSION.md', check: true).stdout().strip(),
license: 'GPL-2+',
meson_version: '>=1.0')
conf = configuration_data()
evdev = dependency('libevdev', version: '>= 1.9')
systemd = dependency('libsystemd', 'libelogind', required: false)
if systemd.found()
conf.set('DBUS_IMPLEMENTATION', 'SYSTEMD')
else
# Gentoo can use libelogind or basu
systemd = dependency('basu', required: true)
conf.set('DBUS_IMPLEMENTATION', 'BASU')
endif
configure_file(output : 'config.h',
configuration : conf)
subdir('resources')
subdir('src')
subdir('tests')