backend: make DRM and libinput backends optional

Co-authored-by: Simon Ser <contact@emersion.fr>
This commit is contained in:
ayaka 2021-03-26 23:28:37 +08:00 committed by Simon Zeni
parent 66c42f4fcb
commit 70fb21c35b
8 changed files with 69 additions and 17 deletions

View file

@ -1,3 +1,19 @@
msg = ['Required for libinput backend support.']
if 'libinput' in backends
msg += 'Install "libinput" or disable the libinput backend.'
endif
libinput = dependency(
'libinput',
version: '>=1.14.0',
required: 'libinput' in backends,
not_found_message: '\n'.join(msg),
)
if not libinput.found()
subdir_done()
endif
wlr_files += files(
'backend.c',
'events.c',
@ -8,3 +24,6 @@ wlr_files += files(
'tablet_tool.c',
'touch.c',
)
features += { 'libinput-backend': true }
wlr_deps += libinput