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 | 1fbcd097ae2841b5f8f56cf67c1e94605deb0d25 (diff) | |
parent | 3546412fc9fb9a51b4316070eff4991c14594127 (diff) |
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 @@ -#.rst: -# FindLibInput -# ------- -# -# Find LibInput library -# -# Try to find LibInpu library. The following values are defined -# -# :: -# -# LIBINPUT_FOUND - True if libinput is available -# LIBINPUT_INCLUDE_DIRS - Include directories for libinput -# LIBINPUT_LIBRARIES - List of libraries for libinput -# LIBINPUT_DEFINITIONS - List of definitions for libinput -# -# and also the following more fine grained variables -# -# :: -# -# LIBINPUT_VERSION -# LIBINPUT_VERSION_MAJOR -# LIBINPUT_VERSION_MINOR -# LIBINPUT_VERSION_MICRO -# -#============================================================================= -# Copyright (c) 2015 Jari Vetoniemi -# -# Distributed under the OSI-approved BSD License (the "License"); -# -# This software is distributed WITHOUT ANY WARRANTY; without even the -# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. -# See the License for more information. -#============================================================================= - -include(FeatureSummary) -set_package_properties(LibInput PROPERTIES - URL "http://freedesktop.org/wiki/Software/libinput/" - DESCRIPTION "Library to handle input devices") - -find_package(PkgConfig) -pkg_check_modules(PC_INPUT QUIET libinput) -find_library(LIBINPUT_LIBRARIES NAMES input HINTS ${PC_INPUT_LIBRARY_DIRS}) -find_path(LIBINPUT_INCLUDE_DIRS libinput.h HINTS ${PC_INPUT_INCLUDE_DIRS}) - -set(LIBINPUT_VERSION ${PC_INPUT_VERSION}) -string(REPLACE "." ";" VERSION_LIST "${PC_INPUT_VERSION}") - -LIST(LENGTH VERSION_LIST n) -if (n EQUAL 3) - list(GET VERSION_LIST 0 LIBINPUT_VERSION_MAJOR) - list(GET VERSION_LIST 1 LIBINPUT_VERSION_MINOR) - list(GET VERSION_LIST 2 LIBINPUT_VERSION_MICRO) -endif () - -# This is compatible with libinput-version.h that exists in upstream -# but isn't in distribution (probably forgotten) -set(LIBINPUT_DEFINITIONS ${PC_INPUT_CFLAGS_OTHER} - -DLIBINPUT_VERSION=\"${LIBINPUT_VERSION}\" - -DLIBINPUT_VERSION_MAJOR=${LIBINPUT_VERSION_MAJOR} - -DLIBINPUT_VERSION_MINOR=${LIBINPUT_VERSION_MINOR} - -DLIBINPUT_VERSION_MICRO=${LIBINPUT_VERSION_MICRO}) - -include(FindPackageHandleStandardArgs) -find_package_handle_standard_args(LIBINPUT DEFAULT_MSG LIBINPUT_INCLUDE_DIRS LIBINPUT_LIBRARIES) -mark_as_advanced(LIBINPUT_INCLUDE_DIRS LIBINPUT_LIBRARIES LIBINPUT_DEFINITIONS - LIBINPUT_VERSION LIBINPUT_VERSION_MAJOR LIBINPUT_VERSION_MICRO LIBINPUT_VERSION_MINOR) |