1 # - Try to find OpenGLES
2 # Once done this will define
4 # OPENGLES_FOUND - system has OpenGLES and EGL
5 # OPENGL_EGL_FOUND - system has EGL
6 # OPENGLES_INCLUDE_DIR - the GLES include directory
7 # OPENGLES_LIBRARY - the GLES library
8 # OPENGLES_EGL_INCLUDE_DIR - the EGL include directory
9 # OPENGLES_EGL_LIBRARY - the EGL library
10 # OPENGLES_LIBRARIES - all libraries needed for OpenGLES
11 # OPENGLES_INCLUDES - all includes needed for OpenGLES
13 # If OPENGLES_ROOT_DIR was defined in the environment, use it.
14 IF(NOT OPENGLES_ROOT_DIR AND NOT $ENV{OPENGLES_ROOT_DIR} STREQUAL "")
15 SET(OPENGLES_ROOT_DIR $ENV{OPENGLES_ROOT_DIR})
18 SET(_opengles_SEARCH_DIRS
23 FIND_PATH(OPENGLES_INCLUDE_DIR
27 ${_opengles_SEARCH_DIRS}
30 FIND_LIBRARY(OPENGLES_LIBRARY
34 ${_opengles_SEARCH_DIRS}
39 FIND_PATH(OPENGLES_EGL_INCLUDE_DIR
43 ${_opengles_SEARCH_DIRS}
46 FIND_LIBRARY(OPENGLES_EGL_LIBRARY
50 ${_opengles_SEARCH_DIRS}
55 IF(OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
56 SET(OPENGL_EGL_FOUND "YES")
58 SET(OPENGL_EGL_FOUND "NO")
61 IF(OPENGLES_LIBRARY AND OPENGLES_INCLUDE_DIR AND
62 OPENGLES_EGL_LIBRARY AND OPENGLES_EGL_INCLUDE_DIR)
63 SET(OPENGLES_LIBRARIES ${OPENGLES_LIBRARY} ${OPENGLES_LIBRARIES}
64 ${OPENGLES_EGL_LIBRARY})
65 SET(OPENGLES_INCLUDES ${OPENGLES_INCLUDE_DIR} ${OPENGLES_EGL_INCLUDE_DIR})
66 SET(OPENGLES_FOUND "YES")
68 SET(OPENGLES_FOUND "NO")
72 OPENGLES_EGL_INCLUDE_DIR