diff --git a/CMakeLists.txt b/CMakeLists.txt index 263393ef25..687246ec2f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -458,12 +458,8 @@ endif() # Try to find OpenGL package if (NOT USE_D3D) find_package(OpenGL QUIET) - find_package(OpenGLES2 QUIET) # If GLES is not found, or we enforced GLES but not OpenGL, setup OpenGL - if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL OR NOT OpenGLES2_FOUND) ) - message(WARNING "OPENGL USE_GLES2=${USE_GLES2} USE_OPENGL=${USE_OPENGL} GLES_FOUND=${OpenGLES2_FOUND}") - endif() - if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL)) + if(OPENGL_FOUND AND (NOT USE_GLES2 OR USE_OPENGL) ) set(USE_OPENGL ON) set(USE_GLES2 OFF) message(STATUS "OpenGL found, using OpenGL") @@ -475,8 +471,6 @@ if (NOT USE_D3D) set(USE_OPENGL OFF) set(USE_GLES2 ON) message(STATUS "OpenGL ES 2 found, using GLES2") - include_directories(${OPENGLES2_INCLUDE_DIRS}) - list(APPEND EXTRA_LIBS ${OPENGLES2_LIBRARIES}) set(USE_GLES2 ${USE_GLES2} CACHE BOOL "${USE_GLES2_DESCR}") endif() endif()