backend/session: make udev dependency optional

udev is now optional at build-time but will fail at runtime because
we don't have an alternative implementation yet.
This commit is contained in:
Simon Ser 2026-05-24 13:54:23 +02:00
parent e8b81b3d4a
commit 905ebaa89a
5 changed files with 31 additions and 10 deletions

View file

@ -1,16 +1,21 @@
msg = ['Required for libinput backend support.']
if 'libinput' in backends
msg += 'Install "libinput" or disable the libinput backend.'
msg += 'Install "@0@" or disable the libinput backend.'
endif
libinput = dependency(
'libinput',
version: '>=1.19.0',
required: 'libinput' in backends,
not_found_message: '\n'.join(msg),
not_found_message: '\n'.join(msg).format('libinput'),
)
udev = dependency(
'libudev',
required: 'libinput' in backends,
not_found_message: '\n'.join(msg).format('libudev'),
)
if not (libinput.found() and features['session'])
if not (libinput.found() and udev.found() and features['session'])
subdir_done()
endif