summaryrefslogtreecommitdiffstats
path: root/Modules/FindOpenGL.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-11-14 15:45:23 (GMT)
committerBrad King <brad.king@kitware.com>2017-11-15 16:46:58 (GMT)
commitaadc38c7fd46827dbd8864e0061c9cf2d16124fe (patch)
treec70cbbb8f6c8487ce1dc00232b33f1e822fe7db3 /Modules/FindOpenGL.cmake
parent78f5d571e4b07cc71d44c78ff36a335693298ccb (diff)
downloadCMake-aadc38c7fd46827dbd8864e0061c9cf2d16124fe.zip
CMake-aadc38c7fd46827dbd8864e0061c9cf2d16124fe.tar.gz
CMake-aadc38c7fd46827dbd8864e0061c9cf2d16124fe.tar.bz2
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 11843ef..1c74012 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)