Skip to content

Commit

Permalink
Make OpenGL preference configurable, default to LEGACY (#7666)
Browse files Browse the repository at this point in the history
This partially reverts 1ec5028
Add option OPENGL_GL_PREFERENCE
  • Loading branch information
SmallJoker committed Sep 22, 2018
1 parent 79e393c commit 785f68e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Expand Up @@ -212,6 +212,7 @@ General options and their default values:
ENABLE_LUAJIT=ON - Build with LuaJIT (much faster than non-JIT Lua)
ENABLE_SYSTEM_GMP=ON - Use GMP from system (much faster than bundled mini-gmp)
ENABLE_SYSTEM_JSONCPP=OFF - 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
6 changes: 5 additions & 1 deletion src/CMakeLists.txt
Expand Up @@ -296,7 +296,11 @@ else()
if(NOT HAIKU)
find_package(X11 REQUIRED)
endif(NOT HAIKU)
set(OpenGL_GL_PREFERENCE "GLVND")

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(BZip2 REQUIRED)
Expand Down

0 comments on commit 785f68e

Please sign in to comment.