From 15d27bbc42b43ef7e10b516377d054cf0f34cb8c Mon Sep 17 00:00:00 2001 From: Sebastien Barre Date: Tue, 10 Sep 2002 13:32:45 -0400 Subject: [PATCH] FIX: typo + bring back the OPENGL_gl_LIBRARY path that can be used to find GLU (was wiped out from FindGLU) --- Modules/FindOpenGL.cmake | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index 4cb270922..565d807e8 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -10,7 +10,7 @@ # # Also defined, but not for general use are # OPENGL_gl_LIBRARY - Path to OpenGL Library -# OPENGL_glu_LIBRARY - Pat to GLU Librar +# OPENGL_glu_LIBRARY - Path to GLU Library # IF (WIN32) @@ -90,8 +90,10 @@ ELSE (WIN32) /usr/X11R6/lib ) -# On Unix OpenGL most certainly always requires X11. -# Feel free to tighten up these conditions if you don't think this is always true. + # On Unix OpenGL most certainly always requires X11. + # Feel free to tighten up these conditions if you don't + # think this is always true. + IF (OPENGL_gl_LIBRARY) INCLUDE( ${CMAKE_ROOT}/Modules/FindX11.cmake ) IF (X11_FOUND) @@ -101,7 +103,8 @@ ELSE (WIN32) FIND_LIBRARY(OPENGL_glu_LIBRARY NAMES MesaGLU GLU - PATHS /usr/lib + PATHS ${OPENGL_gl_LIBRARY} + /usr/lib /usr/local/lib /opt/graphics/OpenGL/lib /usr/openwin/lib @@ -110,7 +113,6 @@ ELSE (WIN32) ENDIF (WIN32) - SET( OPENGL_FOUND "NO" ) IF(OPENGL_INCLUDE_DIR) IF(OPENGL_gl_LIBRARY) @@ -130,9 +132,10 @@ IF(OPENGL_INCLUDE_DIR) ENDIF(OPENGL_glu_LIBRARY) SET( OPENGL_FOUND "YES" ) - -#The following deprecated settings are for backwards compatibility with CMake1.4 + # The following deprecated settings are for backwards + # compatibility with CMake1.4 + SET (OPENGL_LIBRARY ${OPENGL_LIBRARIES}) SET (OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR}) @@ -142,7 +145,9 @@ IF(OPENGL_INCLUDE_DIR) ENDIF(OPENGL_INCLUDE_DIR) -# On OSX, OpenGL is always there - this will need refining for those using OpenGL with X11 +# On OSX, OpenGL is always there - this will need refining for those +# using OpenGL with X11 + IF (APPLE) SET (OPENGL_FOUND "YES") SET (OPENGL_GLU_FOUND "YES") @@ -152,8 +157,6 @@ IF (APPLE) SET (OPENGL_glu_LIBRARY "-framework AGL" CACHE STRING "AGL lib for OSX") ENDIF (APPLE) - - MARK_AS_ADVANCED( OPENGL_INCLUDE_DIR OPENGL_xmesa_INCLUDE_DIR