cmake: use LEGACY OpenGL on FreeBSD only 2fedaa63

Black screen reported on linux with `LEGACY` OpenGL type, set it back to
`GLVND` and only use `LEGACY` on FreeBSD.

Broken in 2fedaa63.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
This commit is contained in:
Rafael Kitover 2019-04-27 22:52:42 +00:00
parent 240257a01b
commit a4eae8025e
No known key found for this signature in database
GPG Key ID: 08AB596679D86240
1 changed files with 5 additions and 1 deletions

View File

@ -198,7 +198,11 @@ endif()
# Look for some dependencies using CMake scripts
find_package(ZLIB REQUIRED)
set(OpenGL_GL_PREFERENCE LEGACY)
set(OpenGL_GL_PREFERENCE GLVND)
if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
set(OpenGL_GL_PREFERENCE LEGACY)
endif()
find_package(OpenGL REQUIRED)