diff options
author | 2018-04-12 20:19:54 -0400 | |
---|---|---|
committer | 2018-04-12 20:19:54 -0400 | |
commit | cd1b32453a9296c18b28bff71607aeb22987b5cd (patch) | |
tree | c653c6d525b471914c01a9d7ae543f521b6138ed /CMake/FindLibInput.cmake | |
parent | Merge pull request #1634 from aleksander/master (diff) | |
parent | Fix separator height calculation (diff) | |
download | sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.tar.gz sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.tar.zst sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.zip |
Merge branch 'wlroots'
Diffstat (limited to 'CMake/FindLibInput.cmake')
-rw-r--r-- | CMake/FindLibInput.cmake | 66 |
1 files changed, 0 insertions, 66 deletions
diff --git a/CMake/FindLibInput.cmake b/CMake/FindLibInput.cmake deleted file mode 100644 index 87721998..00000000 --- a/CMake/FindLibInput.cmake +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | #.rst: | ||
2 | # FindLibInput | ||
3 | # ------- | ||
4 | # | ||
5 | # Find LibInput library | ||
6 | # | ||
7 | # Try to find LibInpu library. The following values are defined | ||
8 | # | ||
9 | # :: | ||
10 | # | ||
11 | # LIBINPUT_FOUND - True if libinput is available | ||
12 | # LIBINPUT_INCLUDE_DIRS - Include directories for libinput | ||
13 | # LIBINPUT_LIBRARIES - List of libraries for libinput | ||
14 | # LIBINPUT_DEFINITIONS - List of definitions for libinput | ||
15 | # | ||
16 | # and also the following more fine grained variables | ||
17 | # | ||
18 | # :: | ||
19 | # | ||
20 | # LIBINPUT_VERSION | ||
21 | # LIBINPUT_VERSION_MAJOR | ||
22 | # LIBINPUT_VERSION_MINOR | ||
23 | # LIBINPUT_VERSION_MICRO | ||
24 | # | ||
25 | #============================================================================= | ||
26 | # Copyright (c) 2015 Jari Vetoniemi | ||
27 | # | ||
28 | # Distributed under the OSI-approved BSD License (the "License"); | ||
29 | # | ||
30 | # This software is distributed WITHOUT ANY WARRANTY; without even the | ||
31 | # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
32 | # See the License for more information. | ||
33 | #============================================================================= | ||
34 | |||
35 | include(FeatureSummary) | ||
36 | set_package_properties(LibInput PROPERTIES | ||
37 | URL "http://freedesktop.org/wiki/Software/libinput/" | ||
38 | DESCRIPTION "Library to handle input devices") | ||
39 | |||
40 | find_package(PkgConfig) | ||
41 | pkg_check_modules(PC_INPUT QUIET libinput) | ||
42 | find_library(LIBINPUT_LIBRARIES NAMES input HINTS ${PC_INPUT_LIBRARY_DIRS}) | ||
43 | find_path(LIBINPUT_INCLUDE_DIRS libinput.h HINTS ${PC_INPUT_INCLUDE_DIRS}) | ||
44 | |||
45 | set(LIBINPUT_VERSION ${PC_INPUT_VERSION}) | ||
46 | string(REPLACE "." ";" VERSION_LIST "${PC_INPUT_VERSION}") | ||
47 | |||
48 | LIST(LENGTH VERSION_LIST n) | ||
49 | if (n EQUAL 3) | ||
50 | list(GET VERSION_LIST 0 LIBINPUT_VERSION_MAJOR) | ||
51 | list(GET VERSION_LIST 1 LIBINPUT_VERSION_MINOR) | ||
52 | list(GET VERSION_LIST 2 LIBINPUT_VERSION_MICRO) | ||
53 | endif () | ||
54 | |||
55 | # This is compatible with libinput-version.h that exists in upstream | ||
56 | # but isn't in distribution (probably forgotten) | ||
57 | set(LIBINPUT_DEFINITIONS ${PC_INPUT_CFLAGS_OTHER} | ||
58 | -DLIBINPUT_VERSION=\"${LIBINPUT_VERSION}\" | ||
59 | -DLIBINPUT_VERSION_MAJOR=${LIBINPUT_VERSION_MAJOR} | ||
60 | -DLIBINPUT_VERSION_MINOR=${LIBINPUT_VERSION_MINOR} | ||
61 | -DLIBINPUT_VERSION_MICRO=${LIBINPUT_VERSION_MICRO}) | ||
62 | |||
63 | include(FindPackageHandleStandardArgs) | ||
64 | find_package_handle_standard_args(LIBINPUT DEFAULT_MSG LIBINPUT_INCLUDE_DIRS LIBINPUT_LIBRARIES) | ||
65 | mark_as_advanced(LIBINPUT_INCLUDE_DIRS LIBINPUT_LIBRARIES LIBINPUT_DEFINITIONS | ||
66 | LIBINPUT_VERSION LIBINPUT_VERSION_MAJOR LIBINPUT_VERSION_MICRO LIBINPUT_VERSION_MINOR) | ||