File: FindGLESv2.cmake

package info (click to toggle)
anbox 0.0~git20190124-1
  • links: PTS, VCS
  • area: contrib
  • in suites: buster
  • size: 22,000 kB
  • sloc: cpp: 76,190; ansic: 7,434; sh: 1,350; xml: 818; java: 780; python: 390; makefile: 35; lisp: 7
file content (25 lines) | stat: -rw-r--r-- 891 bytes parent folder | download | duplicates (8)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# - Try to find GLESv2
# Once done this will define
#  GLESv2_FOUND - System has GLESv2
#  GLESv2_INCLUDE_DIRS - The GLESv2 include directories
#  GLESv2_LIBRARIES - The libraries needed to use GLESv2

find_package(PkgConfig)
pkg_check_modules(PC_GLESv2 QUIET glesv2)

find_path(GLESv2_INCLUDE_DIR GLES2/gl2.h
          HINTS ${PC_GLESv2_INCLUDEDIR} ${PC_GLESv2_INCLUDE_DIRS})

find_library(GLESv2_LIBRARY GLESv2
             HINTS ${PC_GLESv2_LIBDIR} ${PC_GLESv2_LIBRARY_DIRS})

set(GLESv2_LIBRARIES ${GLESv2_LIBRARY})
set(GLESv2_INCLUDE_DIRS ${GLESv2_INCLUDE_DIR})

include(FindPackageHandleStandardArgs)
# handle the QUIETLY and REQUIRED arguments and set GLESv2_FOUND to TRUE
# if all listed variables are TRUE
find_package_handle_standard_args(GLESv2  DEFAULT_MSG
                                  GLESv2_LIBRARY GLESv2_INCLUDE_DIR)

mark_as_advanced(GLESv2_INCLUDE_DIR GLESv2_LIBRARY)