cmake: use vendor-neutral GL implementation when available; fallback to legacy GL

This commit is contained in:
Sean McGovern 2021-08-02 14:22:35 -04:00
parent 87723abdeb
commit a3e17807a7

View file

@ -1954,7 +1954,7 @@ if(WIN32)
set(GlslangLibs ${GlslangLibs} spirv-cross-hlsl)
endif()
if(OpenGL_OpenGL_FOUND AND NOT APPLE)
if(OPENGL_opengl_LIBRARY AND OpenGL_GL_PREFERENCE STREQUAL GLVND AND NOT APPLE)
set(OPENGL_LIBRARIES OpenGL::OpenGL)
endif()