this repo has no description
at GLES_3 100 lines 2.4 kB view raw
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 IF(0) # Disabled, untill further testing 51 52 53 FIND_PATH(OPENGLES_INCLUDE_DIR GLES/gl.h 54 /usr/openwin/share/include 55 /opt/graphics/OpenGL/include /usr/X11R6/include 56 /usr/include 57 ) 58 59 60 FIND_LIBRARY(OPENGLES_gl_LIBRARY 61 NAMES GLES_CM 62 PATHS /opt/graphics/OpenGL/lib 63 /usr/openwin/lib 64 /usr/shlib /usr/X11R6/lib 65 /usr/lib 66 ) 67 68 # On Unix OpenGL most certainly always requires X11. 69 # Feel free to tighten up these conditions if you don't 70 # think this is always true. 71 # It's not true on OSX. 72 73 IF (OPENGLES_gl_LIBRARY) 74 IF(NOT X11_FOUND) 75 INCLUDE(FindX11) 76 ENDIF(NOT X11_FOUND) 77 IF (X11_FOUND) 78 IF (NOT APPLE) 79 SET (OPENGLES_LIBRARIES ${X11_LIBRARIES}) 80 ENDIF (NOT APPLE) 81 ENDIF (X11_FOUND) 82 ENDIF (OPENGLES_gl_LIBRARY) 83 ENDIF() 84 85 ENDIF(APPLE) 86ENDIF (WIN32) 87 88SET( OPENGLES_FOUND "NO" ) 89IF(OPENGLES_gl_LIBRARY) 90 91 SET( OPENGLES_LIBRARIES ${OPENGLES_gl_LIBRARY} ${OPENGLES_LIBRARIES}) 92 93 SET( OPENGLES_FOUND "YES" ) 94 95ENDIF(OPENGLES_gl_LIBRARY) 96 97MARK_AS_ADVANCED( 98 OPENGLES_INCLUDE_DIR 99 OPENGLES_gl_LIBRARY 100)