diff options
| author | manuel <manuel@mausz.at> | 2018-08-30 00:42:04 +0200 |
|---|---|---|
| committer | manuel <manuel@mausz.at> | 2018-08-30 00:42:04 +0200 |
| commit | 2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a (patch) | |
| tree | cc9e1f8ea69eebca8416677b2470a5b3f11a850e /cmake/modules/FindLibInput.cmake | |
| parent | b3d195f0188758a14875a5a2f270e4fd190a679f (diff) | |
| download | kodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.tar.gz kodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.tar.bz2 kodi-pvr-build-2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a.zip | |
sync with upstream
Diffstat (limited to 'cmake/modules/FindLibInput.cmake')
| -rw-r--r-- | cmake/modules/FindLibInput.cmake | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/cmake/modules/FindLibInput.cmake b/cmake/modules/FindLibInput.cmake new file mode 100644 index 0000000..069df5f --- /dev/null +++ b/cmake/modules/FindLibInput.cmake | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | #.rst: | ||
| 2 | # FindLibinput | ||
| 3 | # -------- | ||
| 4 | # Finds the libinput library | ||
| 5 | # | ||
| 6 | # This will define the following variables:: | ||
| 7 | # | ||
| 8 | # LIBINPUT_FOUND - system has libinput | ||
| 9 | # LIBINPUT_INCLUDE_DIRS - the libinput include directory | ||
| 10 | # LIBINPUT_LIBRARIES - the libinput libraries | ||
| 11 | # LIBINPUT_DEFINITIONS - the libinput compile definitions | ||
| 12 | # | ||
| 13 | |||
| 14 | if(PKG_CONFIG_FOUND) | ||
| 15 | pkg_check_modules(PC_LIBINPUT libinput QUIET) | ||
| 16 | endif() | ||
| 17 | |||
| 18 | find_path(LIBINPUT_INCLUDE_DIR NAMES libinput.h | ||
| 19 | PATHS ${PC_LIBINPUT_INCLUDEDIR}) | ||
| 20 | |||
| 21 | find_library(LIBINPUT_LIBRARY NAMES input | ||
| 22 | PATHS ${PC_LIBINPUT_LIBDIR}) | ||
| 23 | |||
| 24 | set(LIBINPUT_VERSION ${PC_LIBINPUT_VERSION}) | ||
| 25 | |||
| 26 | include(FindPackageHandleStandardArgs) | ||
| 27 | find_package_handle_standard_args(LibInput | ||
| 28 | REQUIRED_VARS LIBINPUT_LIBRARY LIBINPUT_INCLUDE_DIR | ||
| 29 | VERSION_VAR LIBINPUT_VERSION) | ||
| 30 | |||
| 31 | if(LIBINPUT_FOUND) | ||
| 32 | set(LIBINPUT_INCLUDE_DIRS ${LIBINPUT_INCLUDE_DIR}) | ||
| 33 | set(LIBINPUT_LIBRARIES ${LIBINPUT_LIBRARY}) | ||
| 34 | endif() | ||
| 35 | |||
| 36 | mark_as_advanced(LIBINPUT_INCLUDE_DIR LIBINPUT_LIBRARY) | ||
