CMake: Prefer GLVND for OpenGL.

We have to decide if we want to link to
libGL.so -- legacy
libOpenGL.so -- GLVND

As we use xxxGetProcAddress, we don't care about feature
levels of the linked library, so we're very fine with the
new way.
This commit is contained in:
degasus 2018-05-09 09:08:22 +02:00
parent 10d230a512
commit be3ce97560
1 changed files with 1 additions and 0 deletions

View File

@ -410,6 +410,7 @@ endif()
include(CheckLib) include(CheckLib)
include(CheckCXXSourceRuns) include(CheckCXXSourceRuns)
set(OpenGL_GL_PREFERENCE GLVND)
find_package(OpenGL) find_package(OpenGL)
if (OPENGL_GL) if (OPENGL_GL)
include_directories(${OPENGL_INCLUDE_DIR}) include_directories(${OPENGL_INCLUDE_DIR})