# Try to find the OpenGLES2 library
#  OPENGLES1_FOUND - system has OpenGL ES 1.0
#  OPENGLES1_INCLUDE_DIR - the OpenGL ES 1.0 include directory
#  OPENGLES1_LIBRARY - the OpenGL ES 1.0 library

FIND_PATH(OPENGLES1_INCLUDE_DIR NAMES GLES/gl.h)
SET(_OPENGLES1_STATIC_LIBS libGLESv1_CM.a libGLES_CM.a)
SET(_OPENGLES1_SHARED_LIBS libGLESv1_CM.dll.a libGLES_CM.dll.a GLESv1_CM GLES_CM)
#IF(USE_STATIC_LIBS)
#    FIND_LIBRARY(OPENGLES1_LIBRARY NAMES ${_OPENGLES1_STATIC_LIBS} ${_OPENGLES1_SHARED_LIBS})
#ELSE()
    FIND_LIBRARY(OPENGLES1_LIBRARY NAMES ${_OPENGLES1_SHARED_LIBS} ${_OPENGLES1_STATIC_LIBS})
#ENDIF()
INCLUDE(FindPackageHandleStandardArgs)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenGLES2 DEFAULT_MSG OPENGLES1_LIBRARY OPENGLES1_INCLUDE_DIR)
MARK_AS_ADVANCED(OPENGLES1_LIBRARY OPENGLES1_INCLUDE_DIR)
