mirror of
https://github.com/Kitware/CMake.git
synced 2025-10-14 02:08:27 +08:00
FindOpenGL: handle GLX without GLVND
On Ubuntu, installing `libgl-dev` provides `libGL` and `libGLX`, but no `libOpenGL`. Avoid defining GLVND targets without the `OpenGL::OpenGL` target.
This commit is contained in:
@@ -465,7 +465,7 @@ if(OPENGL_FOUND)
|
||||
|
||||
# ::GLX is a GLVND library, and thus Linux-only: we don't bother checking
|
||||
# for a framework version of this library.
|
||||
if(OpenGL_GLX_FOUND AND NOT TARGET OpenGL::GLX)
|
||||
if(OpenGL_GLX_FOUND AND NOT TARGET OpenGL::GLX AND TARGET OpenGL::OpenGL)
|
||||
if(IS_ABSOLUTE "${OPENGL_glx_LIBRARY}")
|
||||
add_library(OpenGL::GLX UNKNOWN IMPORTED)
|
||||
set_target_properties(OpenGL::GLX PROPERTIES IMPORTED_LOCATION
|
||||
|
Reference in New Issue
Block a user