~ubuntu-branches/ubuntu/vivid/freerdp/vivid

« back to all changes in this revision

Viewing changes to cmake/FindXi.cmake

  • Committer: Package Import Robot
  • Author(s): Iain Lane
  • Date: 2014-11-11 12:20:50 UTC
  • mfrom: (1.1.9) (9.1.17 sid)
  • Revision ID: package-import@ubuntu.com-20141111122050-wyr8hrnwco9fcmum
Tags: 1.1.0~git20140921.1.440916e+dfsg1-2ubuntu1
* Merge with Debian unstable, remaining changes
  - Disable ffmpeg support
* Disable gstreamer support, this relies on gstreamer 0.10 and we don't want
  to add any more deps on that.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# - Find Xi
 
2
# Find the Xi libraries
 
3
#
 
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
 
8
#
 
9
#     XI_INCLUDE_DIR  - where to find XInput2.h, etc.
 
10
#     XI_LIBRARY      - the Xi library
 
11
#
 
12
 
 
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>
 
17
#
 
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
 
21
#
 
22
#     http://www.apache.org/licenses/LICENSE-2.0
 
23
#
 
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
#=============================================================================
 
30
 
 
31
include(CheckSymbolExists)
 
32
 
 
33
find_path(XI_INCLUDE_DIR NAMES X11/extensions/XInput2.h
 
34
          DOC "The Xi include directory")
 
35
 
 
36
find_library(XI_LIBRARY NAMES Xi
 
37
          DOC "The Xi library")
 
38
 
 
39
include(FindPackageHandleStandardArgs)
 
40
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Xi DEFAULT_MSG XI_LIBRARY XI_INCLUDE_DIR)
 
41
 
 
42
if(XI_FOUND)
 
43
        check_symbol_exists(XITouchClass "${XI_INCLUDE_DIR}/X11/extensions/XInput2.h" HAVE_XI_TOUCH_CLASS)
 
44
 
 
45
        if (NOT HAVE_XI_TOUCH_CLASS)
 
46
                set(XI_FOUND 0)
 
47
        endif()
 
48
endif()
 
49
 
 
50
if(XI_FOUND)
 
51
        set(XI_LIBRARIES ${XI_LIBRARY})
 
52
        set(XI_INCLUDE_DIRS ${XI_INCLUDE_DIR})
 
53
endif()
 
54
 
 
55
mark_as_advanced(XI_INCLUDE_DIR XI_LIBRARY)
 
56