FindLibinput — CMake 4.3.0 Documentation

# FindLibinput

Added in version 3.14.

Finds the libinput library which handles input devices in Wayland compositors and provides a generic X.Org input driver:

    find_package(Libinput [<version>] [...])

## Imported Targets

This module provides the following Imported Targets:

`Libinput::Libinput`

  Target encapsulating the libinput library usage requirements, available only if library is found.

## Result Variables

This module defines the following variables:

`Libinput_FOUND`

  Boolean indicating whether the (requested version of) libinput library was found.

`Libinput_VERSION`

  The version of the libinput found.

`Libinput_LIBRARIES`

  The libraries to link against to use the libinput library.

`Libinput_INCLUDE_DIRS`

  The include directories containing headers needed to use the libinput library.

`Libinput_COMPILE_OPTIONS`

  Compile options needed to use the libinput library. These can be passed to the `target_compile_options()` command, when not using the `Libinput::Libinput` imported target.

## Examples

Finding the libinput library and linking it to a project target:

    find_package(Libinput)
    target_link_libraries(project_target PRIVATE Libinput::Libinput)