Skip to content

Commit

Permalink
Fix opengl3 + Android
Browse files Browse the repository at this point in the history
  • Loading branch information
grorp committed Apr 4, 2024
1 parent 0b46dc2 commit 435f76d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions irr/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,8 +128,12 @@ if(NOT (BSD OR SOLARIS OR EMSCRIPTEN))
endif()

# OpenGL
if(USE_SDL2 AND NOT ANDROID)
option(ENABLE_OPENGL3 "Enable OpenGL 3+" TRUE)

if(USE_SDL2)
if(NOT ANDROID)
set(DEFAULT_OPENGL3 TRUE)
endif()
option(ENABLE_OPENGL3 "Enable OpenGL 3+" ${DEFAULT_OPENGL3})
else()
set(ENABLE_OPENGL3 FALSE)
endif()
Expand Down Expand Up @@ -240,7 +244,7 @@ endif()
if(ENABLE_GLES2)
find_package(OpenGLES2 REQUIRED)
endif()
if(ENABLE_OPENGL OR ENABLE_OPENGL3)
if(ENABLE_OPENGL)
find_package(OpenGL REQUIRED)
endif()
if(USE_SDL2)
Expand Down

0 comments on commit 435f76d

Please sign in to comment.