~ubuntu-branches/ubuntu/vivid/mir/vivid

« back to all changes in this revision

Viewing changes to cmake/FindLibHardware.cmake

  • Committer: Package Import Robot
  • Author(s): Ubuntu daily release
  • Date: 2014-02-04 14:49:07 UTC
  • mto: This revision was merged to the branch mainline in revision 61.
  • Revision ID: package-import@ubuntu.com-20140204144907-o3ruhix0ey26lchl
Tags: upstream-0.1.4+14.04.20140204
ImportĀ upstreamĀ versionĀ 0.1.4+14.04.20140204

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
# Variables defined by this module:
 
2
#message(${LIBHARDWARE_LIBRARY})
2
3
#   LIBHARDWARE_FOUND
 
4
#   LIBHARDWARE_LIBRARIES
3
5
#   LIBHARDWARE_INCLUDE_DIRS
4
 
#   LIBHARDWARE_LIBRARIES
5
6
 
6
7
INCLUDE(FindPackageHandleStandardArgs)
7
8
 
8
 
find_path(LIBHARDWARE_INCLUDE_DIR
9
 
   NAMES         hardware/hardware.h
10
 
                 hardware/gralloc.h
11
 
                 cutils/native_handle.h
12
 
                 system/graphics.h
13
 
                 system/window.h
14
 
 
15
 
                 #we keep these headers in-tree, so search in-tree
16
 
                 NO_CMAKE_FIND_ROOT_PATH
17
 
   )
 
9
find_package( PkgConfig )
 
10
pkg_check_modules(ANDROID_HEADERS REQUIRED android-headers)
 
11
set(LIBHARDWARE_INCLUDE_DIRS ${ANDROID_HEADERS_INCLUDE_DIRS})
18
12
 
19
13
find_library(LIBHARDWARE_LIBRARY
20
14
   NAMES         libhardware.so.2
21
15
                 libhardware.so 
22
 
   HINTS /usr/lib/arm-linux-gnueabihf/
23
16
)
24
17
 
25
18
set(LIBHARDWARE_LIBRARIES ${LIBHARDWARE_LIBRARY})
26
 
set(LIBHARDWARE_INCLUDE_DIRS ${LIBHARDWARE_INCLUDE_DIR})
27
19
 
28
20
# handle the QUIETLY and REQUIRED arguments and set LIBHARDWARE_FOUND to TRUE
29
21
# if all listed variables are TRUE
30
22
find_package_handle_standard_args(LIBHARDWARE DEFAULT_MSG
31
 
                                  LIBHARDWARE_LIBRARY LIBHARDWARE_INCLUDE_DIR)
 
23
                                  LIBHARDWARE_LIBRARY)
32
24
 
33
25
mark_as_advanced(LIBHARDWARE_INCLUDE_DIR LIBHARDWARE_LIBRARY )