Browse Source

FindOpenGL: Fix confusing output with CMP0072 and OpenGL preference

If the legacy `GL` library is found, report that instead of GLVND's
`OpenGL` in the "found" message.
Colton G. Rushton 3 years ago
parent
commit
3a3ecef473
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Modules/FindOpenGL.cmake

+ 1 - 1
Modules/FindOpenGL.cmake

@@ -377,7 +377,7 @@ else()
      (NOT OPENGL_USE_EGL AND
       NOT OPENGL_glx_LIBRARY AND
           OPENGL_gl_LIBRARY))
-    list(APPEND _OpenGL_REQUIRED_VARS OPENGL_gl_LIBRARY)
+    list(PREPEND _OpenGL_REQUIRED_VARS OPENGL_gl_LIBRARY)
   endif()
 
   # We always need the 'gl.h' include dir.