mirror of
https://github.com/minetest/minetest.git
synced 2024-11-27 01:53:45 +01:00
Let ENABLE_GLES appear in cmake_config.h and change its functionality
This commit is contained in:
parent
4f7fa8d417
commit
526a9e4b66
@ -220,7 +220,7 @@ General options and their default values:
|
|||||||
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_FREETYPE=ON - Build with FreeType2; Allows using TTF fonts
|
ENABLE_FREETYPE=ON - Build with FreeType2; Allows using TTF fonts
|
||||||
ENABLE_GETTEXT=ON - Build with Gettext; Allows using translations
|
ENABLE_GETTEXT=ON - Build with Gettext; Allows using translations
|
||||||
ENABLE_GLES=OFF - Search for Open GLES headers & libraries and use them
|
ENABLE_GLES=OFF - Build for OpenGL ES instead of OpenGL (requires support by Irrlicht)
|
||||||
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
|
||||||
|
@ -102,10 +102,18 @@ if(BUILD_CLIENT AND ENABLE_SOUND)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
|
||||||
option(ENABLE_GLES "Enable OpenGL ES support" FALSE)
|
option(ENABLE_GLES "Use OpenGL ES instead of OpenGL" FALSE)
|
||||||
mark_as_advanced(ENABLE_GLES)
|
mark_as_advanced(ENABLE_GLES)
|
||||||
if(ENABLE_GLES)
|
if(ENABLE_GLES)
|
||||||
find_package(OpenGLES2)
|
find_package(OpenGLES2 REQUIRED)
|
||||||
|
elseif()
|
||||||
|
if(NOT WIN32) # Unix probably
|
||||||
|
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()
|
||||||
|
|
||||||
|
|
||||||
@ -275,11 +283,6 @@ else()
|
|||||||
find_package(X11 REQUIRED)
|
find_package(X11 REQUIRED)
|
||||||
endif(NOT HAIKU)
|
endif(NOT HAIKU)
|
||||||
|
|
||||||
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)
|
|
||||||
find_package(JPEG REQUIRED)
|
find_package(JPEG REQUIRED)
|
||||||
find_package(BZip2 REQUIRED)
|
find_package(BZip2 REQUIRED)
|
||||||
find_package(PNG REQUIRED)
|
find_package(PNG REQUIRED)
|
||||||
@ -519,7 +522,6 @@ if(BUILD_CLIENT)
|
|||||||
${PROJECT_NAME}
|
${PROJECT_NAME}
|
||||||
${ZLIB_LIBRARIES}
|
${ZLIB_LIBRARIES}
|
||||||
${IRRLICHT_LIBRARY}
|
${IRRLICHT_LIBRARY}
|
||||||
${OPENGL_LIBRARIES}
|
|
||||||
${JPEG_LIBRARIES}
|
${JPEG_LIBRARIES}
|
||||||
${BZIP2_LIBRARIES}
|
${BZIP2_LIBRARIES}
|
||||||
${PNG_LIBRARIES}
|
${PNG_LIBRARIES}
|
||||||
@ -529,7 +531,6 @@ if(BUILD_CLIENT)
|
|||||||
${LUA_LIBRARY}
|
${LUA_LIBRARY}
|
||||||
${GMP_LIBRARY}
|
${GMP_LIBRARY}
|
||||||
${JSON_LIBRARY}
|
${JSON_LIBRARY}
|
||||||
${OPENGLES2_LIBRARIES}
|
|
||||||
${PLATFORM_LIBS}
|
${PLATFORM_LIBS}
|
||||||
${CLIENT_PLATFORM_LIBS}
|
${CLIENT_PLATFORM_LIBS}
|
||||||
)
|
)
|
||||||
@ -543,6 +544,18 @@ if(BUILD_CLIENT)
|
|||||||
${client_LIBS}
|
${client_LIBS}
|
||||||
)
|
)
|
||||||
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}
|
||||||
|
@ -26,6 +26,7 @@
|
|||||||
#cmakedefine01 USE_SPATIAL
|
#cmakedefine01 USE_SPATIAL
|
||||||
#cmakedefine01 USE_SYSTEM_GMP
|
#cmakedefine01 USE_SYSTEM_GMP
|
||||||
#cmakedefine01 USE_REDIS
|
#cmakedefine01 USE_REDIS
|
||||||
|
#cmakedefine01 ENABLE_GLES
|
||||||
#cmakedefine01 HAVE_ENDIAN_H
|
#cmakedefine01 HAVE_ENDIAN_H
|
||||||
#cmakedefine01 CURSES_HAVE_CURSES_H
|
#cmakedefine01 CURSES_HAVE_CURSES_H
|
||||||
#cmakedefine01 CURSES_HAVE_NCURSES_H
|
#cmakedefine01 CURSES_HAVE_NCURSES_H
|
||||||
|
Loading…
Reference in New Issue
Block a user