summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenGL.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/FindOpenGL.cmake')
-rw-r--r--Modules/FindOpenGL.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index 4766102..d6d1c00 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -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