summaryrefslogtreecommitdiffstats
path: root/cmake/modules/FindLibInput.cmake
diff options
context:
space:
mode:
authormanuel <manuel@mausz.at>2018-08-30 00:42:04 +0200
committermanuel <manuel@mausz.at>2018-08-30 00:42:04 +0200
commit2577b55681a97f3eec3fb0e3b5a4fb7f2cb18b8a (patch)
treecc9e1f8ea69eebca8416677b2470a5b3f11a850e /cmake/modules/FindLibInput.cmake
parentb3d195f0188758a14875a5a2f270e4fd190a679f (diff)
downloadkodi-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.cmake36
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
14if(PKG_CONFIG_FOUND)
15 pkg_check_modules(PC_LIBINPUT libinput QUIET)
16endif()
17
18find_path(LIBINPUT_INCLUDE_DIR NAMES libinput.h
19 PATHS ${PC_LIBINPUT_INCLUDEDIR})
20
21find_library(LIBINPUT_LIBRARY NAMES input
22 PATHS ${PC_LIBINPUT_LIBDIR})
23
24set(LIBINPUT_VERSION ${PC_LIBINPUT_VERSION})
25
26include(FindPackageHandleStandardArgs)
27find_package_handle_standard_args(LibInput
28 REQUIRED_VARS LIBINPUT_LIBRARY LIBINPUT_INCLUDE_DIR
29 VERSION_VAR LIBINPUT_VERSION)
30
31if(LIBINPUT_FOUND)
32 set(LIBINPUT_INCLUDE_DIRS ${LIBINPUT_INCLUDE_DIR})
33 set(LIBINPUT_LIBRARIES ${LIBINPUT_LIBRARY})
34endif()
35
36mark_as_advanced(LIBINPUT_INCLUDE_DIR LIBINPUT_LIBRARY)