1
0
mirror of https://github.com/minetest/minetest.git synced 2025-06-30 23:20:22 +02:00

Remove direct OpenGL(ES) dependency

IrrlichtMt now provides this for us (see last commit)
fixes #12041
This commit is contained in:
sfan5
2022-02-26 15:16:38 +01:00
parent 51294163bb
commit ad7c72c164
3 changed files with 3 additions and 106 deletions

View File

@ -98,8 +98,8 @@ if(BUILD_CLIENT AND ENABLE_SOUND)
endif()
endif()
option(ENABLE_GLES "Use OpenGL ES instead of OpenGL" FALSE)
# TODO: this should be removed one day, we can enable it unconditionally
option(ENABLE_GLES "Enable extra support code for OpenGL ES" FALSE)
mark_as_advanced(ENABLE_GLES)
option(ENABLE_TOUCH "Enable Touchscreen support" FALSE)
@ -107,21 +107,6 @@ if(ENABLE_TOUCH)
add_definitions(-DHAVE_TOUCHSCREENGUI)
endif()
if(BUILD_CLIENT)
# transitive dependency from Irrlicht (see longer explanation below)
if(NOT WIN32)
if(ENABLE_GLES)
find_package(OpenGLES2 REQUIRED)
else()
set(OPENGL_GL_PREFERENCE "LEGACY" CACHE STRING
"See CMake Policy CMP0072 for reference. GLVND is broken on some nvidia setups")
set(OpenGL_GL_PREFERENCE ${OPENGL_GL_PREFERENCE})
find_package(OpenGL REQUIRED)
endif()
endif()
endif()
if(BUILD_CLIENT)
find_package(Freetype REQUIRED)
endif()
@ -544,18 +529,6 @@ if(BUILD_CLIENT)
)
endif()
if(ENABLE_GLES)
target_link_libraries(
${PROJECT_NAME}
${OPENGLES2_LIBRARIES}
${EGL_LIBRARIES}
)
else()
target_link_libraries(
${PROJECT_NAME}
${OPENGL_LIBRARIES}
)
endif()
if(USE_GETTEXT)
target_link_libraries(
${PROJECT_NAME}