this repo has no description
1#-------------------------------------------------------------------
2# This file is part of the CMake build system for OGRE
3# (Object-oriented Graphics Rendering Engine)
4# For the latest info, see http://www.ogre3d.org/
5#
6# The contents of this file are placed in the public domain. Feel
7# free to make use of it in any way you like.
8#-------------------------------------------------------------------
9
10# - Try to find OpenGLES
11# Once done this will define
12#
13# OPENGLES_FOUND - system has OpenGLES
14# OPENGLES_INCLUDE_DIR - the GL include directory
15# OPENGLES_LIBRARIES - Link these to use OpenGLES
16
17include(FindPkgMacros)
18
19IF (WIN32)
20
21 IF(0) # Disabled, untill further testing
22 IF (CYGWIN)
23
24 FIND_PATH(OPENGLES_INCLUDE_DIR GLES/gl.h )
25
26 FIND_LIBRARY(OPENGLES_gl_LIBRARY libgles_cm )
27
28 ELSE (CYGWIN)
29
30 IF(BORLAND)
31 SET (OPENGLES_gl_LIBRARY import32 CACHE STRING "OpenGL library for win32")
32 ELSE(BORLAND)
33 #MS compiler - todo - fix the following line:
34 SET (OPENGLES_gl_LIBRARY ${OGRE_SOURCE_DIR}/Dependencies/lib/release/libgles_cm.lib CACHE STRING "OpenGL library for win32")
35 ENDIF(BORLAND)
36
37 ENDIF (CYGWIN)
38 ENDIF()
39
40ELSE (WIN32)
41
42 IF (APPLE)
43
44 create_search_paths(/Developer/Platforms)
45 findpkg_framework(OpenGLES)
46 set(OPENGLES_gl_LIBRARY "-framework OpenGLES")
47
48 ELSE(APPLE)
49
50
51
52 FIND_PATH(OPENGLES_INCLUDE_DIR GLES2/gl2.h
53 /usr/openwin/share/include
54 /opt/graphics/OpenGL/include /usr/X11R6/include
55 /usr/include
56 # Raspberry Pi (Raspbian) puts these in /opt/vc "VideoCore"
57 /opt/vc/include
58 )
59
60
61 FIND_LIBRARY(OPENGLES_gl_LIBRARY
62 # NAMES GLES_CM
63 NAMES GLESv2
64 PATHS /opt/graphics/OpenGL/lib
65 /usr/openwin/lib
66 /usr/shlib /usr/X11R6/lib
67 /usr/lib
68 # Raspberry Pi (Raspbian) puts these in /opt/vc "VideoCore"
69 /opt/vc/lib
70 )
71 FIND_LIBRARY(OPENGLES_gl1_LIBRARY
72 NAMES GLESv1_CM
73 PATHS /opt/graphics/OpenGL/lib
74 /usr/openwin/lib
75 /usr/shlib /usr/X11R6/lib
76 /usr/lib
77 # Raspberry Pi (Raspbian) puts these in /opt/vc "VideoCore"
78 /opt/vc/lib
79 )
80
81 # On Unix OpenGL most certainly always requires X11.
82 # Feel free to tighten up these conditions if you don't
83 # think this is always true.
84 # It's not true on OSX.
85 # This is not true on Raspberry Pi (Raspbian)
86
87 IF(0) # Disabled, untill further testing
88 IF (OPENGLES_gl_LIBRARY)
89 IF(NOT X11_FOUND)
90 INCLUDE(FindX11)
91 ENDIF(NOT X11_FOUND)
92 IF (X11_FOUND)
93 IF (NOT APPLE)
94 SET (OPENGLES_LIBRARIES ${X11_LIBRARIES})
95 ENDIF (NOT APPLE)
96 ENDIF (X11_FOUND)
97 ENDIF (OPENGLES_gl_LIBRARY)
98 ENDIF()
99
100 ENDIF(APPLE)
101ENDIF (WIN32)
102
103SET( OPENGLES_FOUND "NO" )
104IF(OPENGLES_gl_LIBRARY)
105
106 IF(NOT OPENGLES_gl1_FOUND)
107 SET(OPENGLES_gl1_LIBRARY "")
108 ENDIF()
109
110 SET( OPENGLES_LIBRARIES ${OPENGLES_gl_LIBRARY} ${OPENGLES_gl1_LIBRARY} ${OPENGLES_LIBRARIES})
111
112 SET( OPENGLES_FOUND "YES" )
113
114ENDIF(OPENGLES_gl_LIBRARY)
115
116MARK_AS_ADVANCED(
117 OPENGLES_INCLUDE_DIR
118 OPENGLES_gl_LIBRARY
119)