summaryrefslogtreecommitdiff
path: root/Modules/FindOpenGL.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-14 10:45:23 -0500
committerBrad King <brad.king@kitware.com>2017-11-15 11:46:58 -0500
commitaadc38c7fd46827dbd8864e0061c9cf2d16124fe (patch)
treec70cbbb8f6c8487ce1dc00232b33f1e822fe7db3 /Modules/FindOpenGL.cmake
parent78f5d571e4b07cc71d44c78ff36a335693298ccb (diff)
downloadcmake-aadc38c7fd46827dbd8864e0061c9cf2d16124fe.tar.gz
FindOpenGL: Re-order component library searches
Move the search for the legacy GL library to after the GLVND libraries. For now we still always look for both.
Diffstat (limited to 'Modules/FindOpenGL.cmake')
-rw-r--r--Modules/FindOpenGL.cmake15
1 files changed, 8 insertions, 7 deletions
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake
index 11843efa94..1c74012b36 100644
--- a/Modules/FindOpenGL.cmake
+++ b/Modules/FindOpenGL.cmake
@@ -179,13 +179,6 @@ else()
/opt/graphics/OpenGL/include /usr/X11R6/include
)
- find_library(OPENGL_gl_LIBRARY
- NAMES GL MesaGL
- PATHS /opt/graphics/OpenGL/lib
- /usr/openwin/lib
- /usr/shlib /usr/X11R6/lib
- ${_OPENGL_LIB_PATH}
- )
# Search for the GLVND libraries. We do this regardless of COMPONENTS; we'll
# take into account the COMPONENTS logic later.
find_library(OPENGL_opengl_LIBRARY
@@ -213,6 +206,14 @@ else()
/usr/shlib /usr/X11R6/lib
)
+ find_library(OPENGL_gl_LIBRARY
+ NAMES GL MesaGL
+ PATHS /opt/graphics/OpenGL/lib
+ /usr/openwin/lib
+ /usr/shlib /usr/X11R6/lib
+ ${_OPENGL_LIB_PATH}
+ )
+
# FPHSA cannot handle "this OR that is required", so we conditionally set what
# it must look for. First clear any previous config we might have done:
set(_OpenGL_REQUIRED_VARS)