Skip to content

Commit

Permalink
Update CMakeLists.txt
Browse files Browse the repository at this point in the history
Signed-off-by: Escain <[email protected]>
  • Loading branch information
Escain authored Oct 17, 2024
1 parent 2bd89f5 commit e0cb3f8
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand All @@ -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()
Expand Down

0 comments on commit e0cb3f8

Please sign in to comment.