mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-02-05 04:06:11 -05:00
build: check if libinput supports high-res scroll
Add a project argument (LIBINPUT_HAS_SCROLL_VALUE120) to allow building against old versions of libinput or, where high-resolution scroll is available, support it.
This commit is contained in:
parent
d0b8c111fd
commit
bc3b39bde3
1 changed files with 11 additions and 0 deletions
|
|
@ -27,3 +27,14 @@ wlr_files += files(
|
|||
|
||||
features += { 'libinput-backend': true }
|
||||
wlr_deps += libinput
|
||||
|
||||
# Check whether libinput supports high-resolution scroll or not
|
||||
libinput_supports_scroll_value120 = cc.has_function(
|
||||
'libinput_event_pointer_get_scroll_value_v120',
|
||||
dependencies: libinput,
|
||||
)
|
||||
|
||||
add_project_arguments(
|
||||
'-DLIBINPUT_HAS_SCROLL_VALUE120=@0@'.format(libinput_supports_scroll_value120.to_int()),
|
||||
language: 'c',
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue