IF(APPLE)
    FIND_LIBRARY(OPENGL_LIBRARY NAMES OpenGLES
        PATHS ${CMAKE_OSX_SYSROOT}/System/Library
        PATH_SUFFIXES Frameworks
        NO_DEFAULT_PATH)
MESSAGE("Found OpenGLES library ${OPENGL_LIBRARY}") 
    SET(OPENGL_LIBRARIES ${OPENGL_LIBRARY})
    SET(OPENGL_INCLUDE_DIR "${OPENGL_LIBRARIES}/Headers")
    SET(OPENGL_FOUND TRUE)
ELSE ()
    MESSAGE("Could not find OpenGLES library") 
ENDIF()
