Adding GLU to the OPENGL_LIBRARIES only if it is found.

This commit is contained in:
Bill Hoffman 2002-09-09 09:50:39 -04:00
parent 3abb9e240d
commit 43d055eb7a
1 changed files with 4 additions and 2 deletions

View File

@ -121,14 +121,16 @@ IF(OPENGL_INCLUDE_DIR)
SET( OPENGL_XMESA_FOUND "NO" )
ENDIF(OPENGL_xmesa_INCLUDE_DIR)
SET( OPENGL_LIBRARIES ${OPENGL_gl_LIBRARY} ${OPENGL_LIBRARIES})
IF(OPENGL_glu_LIBRARY)
SET( OPENGL_GLU_FOUND "YES" )
ENDIF(OPENGL_glu_LIBRARY)
SET( OPENGL_LIBRARIES ${OPENGL_glu_LIBRARY} ${OPENGL_LIBRARIES} )
ELSE(OPENGL_glu_LIBRARY)
SET( OPENGL_GLU_FOUND "NO" )
ENDIF(OPENGL_glu_LIBRARY)
SET( OPENGL_FOUND "YES" )
SET( OPENGL_LIBRARIES ${OPENGL_glu_LIBRARY} ${OPENGL_gl_LIBRARY} ${OPENGL_LIBRARIES})
#The following deprecated settings are for backwards compatibility with CMake1.4
SET (OPENGL_LIBRARY ${OPENGL_LIBRARIES})