diff options
author | Drew DeVault <sir@cmpwn.com> | 2017-12-01 08:21:01 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-01 08:21:01 -0500 |
commit | 1cfebe827ae53a243ffdd1e09f8b71d4c1a4e254 (patch) | |
tree | b74002984ff80201c02ed9c22ca2fe1cdae98e23 /CMake/FindLibInput.cmake | |
parent | Merge pull request #1482 from acrisci/refactor/use-frame-done (diff) | |
parent | update travis (diff) | |
download | sway-1cfebe827ae53a243ffdd1e09f8b71d4c1a4e254.tar.gz sway-1cfebe827ae53a243ffdd1e09f8b71d4c1a4e254.tar.zst sway-1cfebe827ae53a243ffdd1e09f8b71d4c1a4e254.zip |
Merge pull request #1479 from acrisci/feature/meson-build
meson build
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) | ||