mirror of
https://github.com/minetest/minetest.git
synced 2024-08-19 04:54:18 +02:00
Remove direct OpenGL(ES) dependency
IrrlichtMt now provides this for us (see last commit) fixes #12041
This commit is contained in:
parent
51294163bb
commit
ad7c72c164
@ -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_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_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_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_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_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
|
ENABLE_REDIS=ON - Build with libhiredis; Enables use of Redis map backend
|
||||||
@ -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_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_GMP=ON - Use GMP from system (much faster than bundled mini-gmp)
|
||||||
ENABLE_SYSTEM_JSONCPP=ON - Use JsonCPP from system
|
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)
|
RUN_IN_PLACE=FALSE - Create a portable install (worlds, settings etc. in current directory)
|
||||||
USE_GPROF=FALSE - Enable profiling using GProf
|
USE_GPROF=FALSE - Enable profiling using GProf
|
||||||
VERSION_EXTRA= - Text to append to version (e.g. VERSION_EXTRA=foobar -> Minetest 0.4.9-foobar)
|
VERSION_EXTRA= - Text to append to version (e.g. VERSION_EXTRA=foobar -> Minetest 0.4.9-foobar)
|
||||||
@ -300,8 +299,6 @@ Library specific options:
|
|||||||
OPENAL_DLL - Only if building with sound on Windows; path to OpenAL32.dll
|
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_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
|
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_INCLUDE_DIR - Directory that contains sqlite3.h
|
||||||
SQLITE3_LIBRARY - Path to libsqlite3.a/libsqlite3.so/sqlite3.lib
|
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
|
VORBISFILE_LIBRARY - Only if building with sound; path to libvorbisfile.a/libvorbisfile.so/libvorbisfile.dll.a
|
||||||
|
@ -1,73 +0,0 @@
|
|||||||
#-------------------------------------------------------------------
|
|
||||||
# The contents of this file are placed in the public domain. Feel
|
|
||||||
# free to make use of it in any way you like.
|
|
||||||
#-------------------------------------------------------------------
|
|
||||||
|
|
||||||
# - Try to find OpenGLES and EGL
|
|
||||||
# Once done this will define
|
|
||||||
#
|
|
||||||
# OPENGLES2_FOUND - system has OpenGLES
|
|
||||||
# OPENGLES2_INCLUDE_DIR - the GL include directory
|
|
||||||
# OPENGLES2_LIBRARIES - Link these to use OpenGLES
|
|
||||||
#
|
|
||||||
# EGL_FOUND - system has EGL
|
|
||||||
# EGL_INCLUDE_DIR - the EGL include directory
|
|
||||||
# EGL_LIBRARIES - Link these to use EGL
|
|
||||||
|
|
||||||
# Win32 and Apple are not tested!
|
|
||||||
# Linux tested and works
|
|
||||||
|
|
||||||
if(WIN32)
|
|
||||||
find_path(OPENGLES2_INCLUDE_DIR GLES2/gl2.h)
|
|
||||||
find_library(OPENGLES2_LIBRARY libGLESv2)
|
|
||||||
elseif(APPLE)
|
|
||||||
create_search_paths(/Developer/Platforms)
|
|
||||||
findpkg_framework(OpenGLES2)
|
|
||||||
set(OPENGLES2_LIBRARY "-framework OpenGLES")
|
|
||||||
else()
|
|
||||||
# Unix
|
|
||||||
find_path(OPENGLES2_INCLUDE_DIR GLES2/gl2.h
|
|
||||||
PATHS /usr/openwin/share/include
|
|
||||||
/opt/graphics/OpenGL/include
|
|
||||||
/usr/X11R6/include
|
|
||||||
/usr/include
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(OPENGLES2_LIBRARY
|
|
||||||
NAMES GLESv2
|
|
||||||
PATHS /opt/graphics/OpenGL/lib
|
|
||||||
/usr/openwin/lib
|
|
||||||
/usr/X11R6/lib
|
|
||||||
/usr/lib
|
|
||||||
)
|
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
|
||||||
find_package_handle_standard_args(OpenGLES2 DEFAULT_MSG OPENGLES2_LIBRARY OPENGLES2_INCLUDE_DIR)
|
|
||||||
|
|
||||||
find_path(EGL_INCLUDE_DIR EGL/egl.h
|
|
||||||
PATHS /usr/openwin/share/include
|
|
||||||
/opt/graphics/OpenGL/include
|
|
||||||
/usr/X11R6/include
|
|
||||||
/usr/include
|
|
||||||
)
|
|
||||||
|
|
||||||
find_library(EGL_LIBRARY
|
|
||||||
NAMES EGL
|
|
||||||
PATHS /opt/graphics/OpenGL/lib
|
|
||||||
/usr/openwin/lib
|
|
||||||
/usr/X11R6/lib
|
|
||||||
/usr/lib
|
|
||||||
)
|
|
||||||
|
|
||||||
find_package_handle_standard_args(EGL DEFAULT_MSG EGL_LIBRARY EGL_INCLUDE_DIR)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(OPENGLES2_LIBRARIES ${OPENGLES2_LIBRARY})
|
|
||||||
set(EGL_LIBRARIES ${EGL_LIBRARY})
|
|
||||||
|
|
||||||
mark_as_advanced(
|
|
||||||
OPENGLES2_INCLUDE_DIR
|
|
||||||
OPENGLES2_LIBRARY
|
|
||||||
EGL_INCLUDE_DIR
|
|
||||||
EGL_LIBRARY
|
|
||||||
)
|
|
@ -98,8 +98,8 @@ if(BUILD_CLIENT AND ENABLE_SOUND)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# TODO: this should be removed one day, we can enable it unconditionally
|
||||||
option(ENABLE_GLES "Use OpenGL ES instead of OpenGL" FALSE)
|
option(ENABLE_GLES "Enable extra support code for OpenGL ES" FALSE)
|
||||||
mark_as_advanced(ENABLE_GLES)
|
mark_as_advanced(ENABLE_GLES)
|
||||||
|
|
||||||
option(ENABLE_TOUCH "Enable Touchscreen support" FALSE)
|
option(ENABLE_TOUCH "Enable Touchscreen support" FALSE)
|
||||||
@ -107,21 +107,6 @@ if(ENABLE_TOUCH)
|
|||||||
add_definitions(-DHAVE_TOUCHSCREENGUI)
|
add_definitions(-DHAVE_TOUCHSCREENGUI)
|
||||||
endif()
|
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)
|
if(BUILD_CLIENT)
|
||||||
find_package(Freetype REQUIRED)
|
find_package(Freetype REQUIRED)
|
||||||
endif()
|
endif()
|
||||||
@ -544,18 +529,6 @@ if(BUILD_CLIENT)
|
|||||||
)
|
)
|
||||||
endif()
|
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)
|
if(USE_GETTEXT)
|
||||||
target_link_libraries(
|
target_link_libraries(
|
||||||
${PROJECT_NAME}
|
${PROJECT_NAME}
|
||||||
|
Loading…
Reference in New Issue
Block a user