1 #-------------------------------------------------------------------
2 # The contents of this file are placed in the public domain. Feel
3 # free to make use of it in any way you like.
4 #-------------------------------------------------------------------
6 # - Try to find OpenGLES and EGL
7 # Once done this will define
9 # OPENGLES2_FOUND - system has OpenGLES
10 # OPENGLES2_INCLUDE_DIR - the GL include directory
11 # OPENGLES2_LIBRARIES - Link these to use OpenGLES
13 # EGL_FOUND - system has EGL
14 # EGL_INCLUDE_DIR - the EGL include directory
15 # EGL_LIBRARIES - Link these to use EGL
17 # Win32 and Apple are not tested!
18 # Linux tested and works
21 find_path(OPENGLES2_INCLUDE_DIR GLES2/gl2.h)
22 find_library(OPENGLES2_LIBRARY libGLESv2)
24 create_search_paths(/Developer/Platforms)
25 findpkg_framework(OpenGLES2)
26 set(OPENGLES2_LIBRARY "-framework OpenGLES")
29 find_path(OPENGLES2_INCLUDE_DIR GLES2/gl2.h
30 PATHS /usr/openwin/share/include
31 /opt/graphics/OpenGL/include
36 find_library(OPENGLES2_LIBRARY
38 PATHS /opt/graphics/OpenGL/lib
44 include(FindPackageHandleStandardArgs)
45 find_package_handle_standard_args(OPENGLES2 DEFAULT_MSG OPENGLES2_LIBRARY OPENGLES2_INCLUDE_DIR)
47 find_path(EGL_INCLUDE_DIR EGL/egl.h
48 PATHS /usr/openwin/share/include
49 /opt/graphics/OpenGL/include
54 find_library(EGL_LIBRARY
56 PATHS /opt/graphics/OpenGL/lib
62 include(FindPackageHandleStandardArgs)
63 find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR)
66 set(OPENGLES2_LIBRARIES ${OPENGLES2_LIBRARY})
67 set(EGL_LIBRARIES ${EGL_LIBRARY})