Changed: #1275 Added OpenGL ES CMake module
This commit is contained in:
parent
61d7295efa
commit
41e103bc7a
4 changed files with 62 additions and 14 deletions
49
code/CMakeModules/FindOpenGLES.cmake
Normal file
49
code/CMakeModules/FindOpenGLES.cmake
Normal file
|
@ -0,0 +1,49 @@
|
||||||
|
# - Try to find OpenGL ES
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# OPENGLES_FOUND - system has OpenGL ES
|
||||||
|
# OPENGLES_EGL_FOUND - system has EGL
|
||||||
|
# OPENGLES_LIBRARIES - Link these to use OpenGL ES and EGL
|
||||||
|
#
|
||||||
|
# If you want to use just GL ES you can use these values
|
||||||
|
# OPENGLES_GLES_LIBRARY - Path to OpenGL ES Library
|
||||||
|
# OPENGLES_EGL_LIBRARY - Path to EGL Library
|
||||||
|
|
||||||
|
FIND_LIBRARY(OPENGLES_GLES_LIBRARY
|
||||||
|
NAMES GLESv1_CM libGLESv1_CM gles_cm libgles_cm
|
||||||
|
PATHS
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/X11R6/lib
|
||||||
|
/usr/X11R6/lib
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/opt/csw/lib
|
||||||
|
/opt/lib
|
||||||
|
/usr/freeware/lib64
|
||||||
|
)
|
||||||
|
|
||||||
|
FIND_LIBRARY(OPENGLES_EGL_LIBRARY
|
||||||
|
NAMES EGL libEGL
|
||||||
|
PATHS
|
||||||
|
/usr/local/lib
|
||||||
|
/usr/lib
|
||||||
|
/usr/local/X11R6/lib
|
||||||
|
/usr/X11R6/lib
|
||||||
|
/sw/lib
|
||||||
|
/opt/local/lib
|
||||||
|
/opt/csw/lib
|
||||||
|
/opt/lib
|
||||||
|
/usr/freeware/lib64
|
||||||
|
)
|
||||||
|
|
||||||
|
IF(OPENGLES_GLES_LIBRARY)
|
||||||
|
SET(OPENGLES_FOUND "YES")
|
||||||
|
SET(OPENGLES_LIBRARIES ${OPENGLES_GLES_LIBRARY} ${OPENGLES_LIBRARIES})
|
||||||
|
IF(OPENGLES_EGL_LIBRARY)
|
||||||
|
SET(OPENGLES_EGL_FOUND "YES")
|
||||||
|
SET(OPENGLES_LIBRARIES ${OPENGLES_EGL_LIBRARY} ${OPENGLES_LIBRARIES})
|
||||||
|
ELSE(OPENGLES_EGL_LIBRARY)
|
||||||
|
SET(OPENGLES_EGL_FOUND "NO")
|
||||||
|
ENDIF(OPENGLES_EGL_LIBRARY)
|
||||||
|
ENDIF(OPENGLES_GLES_LIBRARY)
|
|
@ -18,19 +18,6 @@ ENDIF(WIN32)
|
||||||
IF(WITH_3D)
|
IF(WITH_3D)
|
||||||
FIND_PACKAGE(FreeType)
|
FIND_PACKAGE(FreeType)
|
||||||
|
|
||||||
IF(WITH_DRIVER_OPENGL)
|
|
||||||
FIND_PACKAGE(OpenGL)
|
|
||||||
IF(NOT WIN32)
|
|
||||||
IF(APPLE)
|
|
||||||
FIND_LIBRARY(CARBON NAMES Carbon)
|
|
||||||
FIND_LIBRARY(COCOA NAMES Cocoa)
|
|
||||||
ELSE(APPLE)
|
|
||||||
FIND_PACKAGE(X11)
|
|
||||||
FIND_PACKAGE(XF86VidMode)
|
|
||||||
ENDIF(APPLE)
|
|
||||||
ENDIF(NOT WIN32)
|
|
||||||
ENDIF(WITH_DRIVER_OPENGL)
|
|
||||||
|
|
||||||
IF(WITH_NEL_CEGUI)
|
IF(WITH_NEL_CEGUI)
|
||||||
FIND_PACKAGE(CEGUI)
|
FIND_PACKAGE(CEGUI)
|
||||||
ENDIF(WITH_NEL_CEGUI)
|
ENDIF(WITH_NEL_CEGUI)
|
||||||
|
|
|
@ -1,3 +1,15 @@
|
||||||
|
FIND_PACKAGE(OpenGL REQUIRED)
|
||||||
|
|
||||||
|
IF(NOT WIN32)
|
||||||
|
IF(APPLE)
|
||||||
|
FIND_LIBRARY(CARBON NAMES Carbon)
|
||||||
|
FIND_LIBRARY(COCOA NAMES Cocoa)
|
||||||
|
ELSE(APPLE)
|
||||||
|
FIND_PACKAGE(X11)
|
||||||
|
FIND_PACKAGE(XF86VidMode)
|
||||||
|
ENDIF(APPLE)
|
||||||
|
ENDIF(NOT WIN32)
|
||||||
|
|
||||||
FILE(GLOB SRC *.cpp *.h *.def)
|
FILE(GLOB SRC *.cpp *.h *.def)
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FIND_PACKAGE(OpenGLES)
|
FIND_PACKAGE(OpenGLES REQUIRED)
|
||||||
|
|
||||||
IF(NOT WIN32)
|
IF(NOT WIN32)
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
|
|
Loading…
Reference in a new issue