Skip to content

Commit

Permalink
Remove direct OpenGL(ES) dependency
Browse files Browse the repository at this point in the history
IrrlichtMt now provides this for us (see last commit)
fixes minetest#12041
  • Loading branch information
sfan5 committed Mar 9, 2022
1 parent 5129416 commit ad7c72c
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 106 deletions.
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ General options and their default values:
ENABLE_CURL=ON - Build with cURL; Enables use of online mod repo, public serverlist and remote media fetching via http
ENABLE_CURSES=ON - Build with (n)curses; Enables a server side terminal (command line option: --terminal)
ENABLE_GETTEXT=ON - Build with Gettext; Allows using translations
ENABLE_GLES=OFF - Build for OpenGL ES instead of OpenGL (requires support by IrrlichtMt)
ENABLE_GLES=OFF - Enable extra support code for OpenGL ES (requires support by IrrlichtMt)
ENABLE_LEVELDB=ON - Build with LevelDB; Enables use of LevelDB map backend
ENABLE_POSTGRESQL=ON - Build with libpq; Enables use of PostgreSQL map backend (PostgreSQL 9.5 or greater recommended)
ENABLE_REDIS=ON - Build with libhiredis; Enables use of Redis map backend
Expand All @@ -259,7 +259,6 @@ General options and their default values:
ENABLE_PROMETHEUS=OFF - Build with Prometheus metrics exporter (listens on tcp/30000 by default)
ENABLE_SYSTEM_GMP=ON - Use GMP from system (much faster than bundled mini-gmp)
ENABLE_SYSTEM_JSONCPP=ON - Use JsonCPP from system
OPENGL_GL_PREFERENCE=LEGACY - Linux client build only; See CMake Policy CMP0072 for reference
RUN_IN_PLACE=FALSE - Create a portable install (worlds, settings etc. in current directory)
USE_GPROF=FALSE - Enable profiling using GProf
VERSION_EXTRA= - Text to append to version (e.g. VERSION_EXTRA=foobar -> Minetest 0.4.9-foobar)
Expand Down Expand Up @@ -300,8 +299,6 @@ Library specific options:
OPENAL_DLL - Only if building with sound on Windows; path to OpenAL32.dll
OPENAL_INCLUDE_DIR - Only if building with sound; directory where al.h is located
OPENAL_LIBRARY - Only if building with sound; path to libopenal.a/libopenal.so/OpenAL32.lib
OPENGLES2_INCLUDE_DIR - Only if building with GLES; directory that contains gl2.h
OPENGLES2_LIBRARY - Only if building with GLES; path to libGLESv2.a/libGLESv2.so
SQLITE3_INCLUDE_DIR - Directory that contains sqlite3.h
SQLITE3_LIBRARY - Path to libsqlite3.a/libsqlite3.so/sqlite3.lib
VORBISFILE_LIBRARY - Only if building with sound; path to libvorbisfile.a/libvorbisfile.so/libvorbisfile.dll.a
Expand Down
73 changes: 0 additions & 73 deletions cmake/Modules/FindOpenGLES2.cmake

This file was deleted.

31 changes: 2 additions & 29 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -98,30 +98,15 @@ 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)
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()
Expand Down Expand Up @@ -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}
Expand Down

0 comments on commit ad7c72c

Please sign in to comment.