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.
This commit is contained in:
Brad King
2017-11-14 10:45:23 -05:00
parent 78f5d571e4
commit aadc38c7fd

View File

@@ -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)