2
# Find the Xi libraries
4
# This module defines the following variables:
5
# XI_FOUND - true if XI_INCLUDE_DIR & XI_LIBRARY are found
6
# XI_LIBRARIES - Set when XI_LIBRARY is found
7
# XI_INCLUDE_DIRS - Set when XI_INCLUDE_DIR is found
9
# XI_INCLUDE_DIR - where to find XInput2.h, etc.
10
# XI_LIBRARY - the Xi library
13
#=============================================================================
14
# Copyright 2011 O.S. Systems Software Ltda.
15
# Copyright 2011 Otavio Salvador <otavio@ossystems.com.br>
16
# Copyright 2011 Marc-Andre Moreau <marcandre.moreau@gmail.com>
18
# Licensed under the Apache License, Version 2.0 (the "License");
19
# you may not use this file except in compliance with the License.
20
# You may obtain a copy of the License at
22
# http://www.apache.org/licenses/LICENSE-2.0
24
# Unless required by applicable law or agreed to in writing, software
25
# distributed under the License is distributed on an "AS IS" BASIS,
26
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
27
# See the License for the specific language governing permissions and
28
# limitations under the License.
29
#=============================================================================
31
include(CheckSymbolExists)
33
find_path(XI_INCLUDE_DIR NAMES X11/extensions/XInput2.h
34
DOC "The Xi include directory")
36
find_library(XI_LIBRARY NAMES Xi
39
include(FindPackageHandleStandardArgs)
40
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xi DEFAULT_MSG XI_LIBRARY XI_INCLUDE_DIR)
43
check_symbol_exists(XITouchClass "${XI_INCLUDE_DIR}/X11/extensions/XInput2.h" HAVE_XI_TOUCH_CLASS)
45
if (NOT HAVE_XI_TOUCH_CLASS)
51
set(XI_LIBRARIES ${XI_LIBRARY})
52
set(XI_INCLUDE_DIRS ${XI_INCLUDE_DIR})
55
mark_as_advanced(XI_INCLUDE_DIR XI_LIBRARY)