Merge topic 'improve-findglut'

14dadbd FindGLUT: honor REQUIRED (#12466)
This commit is contained in:
David Cole 2012-02-21 15:54:19 -05:00 committed by CMake Topic Stage
commit e17f270b7a
1 changed files with 16 additions and 18 deletions

View File

@ -64,25 +64,23 @@ ELSE (WIN32)
ENDIF (WIN32) ENDIF (WIN32)
SET( GLUT_FOUND "NO" ) INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
IF(GLUT_INCLUDE_DIR) FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLUT REQUIRED_VARS GLUT_glut_LIBRARY GLUT_INCLUDE_DIR)
IF(GLUT_glut_LIBRARY)
# Is -lXi and -lXmu required on all platforms that have it? IF (GLUT_FOUND)
# If not, we need some way to figure out what platform we are on. # Is -lXi and -lXmu required on all platforms that have it?
SET( GLUT_LIBRARIES # If not, we need some way to figure out what platform we are on.
${GLUT_glut_LIBRARY} SET( GLUT_LIBRARIES
${GLUT_Xmu_LIBRARY} ${GLUT_glut_LIBRARY}
${GLUT_Xi_LIBRARY} ${GLUT_Xmu_LIBRARY}
${GLUT_cocoa_LIBRARY} ${GLUT_Xi_LIBRARY}
) ${GLUT_cocoa_LIBRARY}
SET( GLUT_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 (GLUT_LIBRARY ${GLUT_LIBRARIES}) SET (GLUT_LIBRARY ${GLUT_LIBRARIES})
SET (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR}) SET (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR})
ENDIF(GLUT_FOUND)
ENDIF(GLUT_glut_LIBRARY)
ENDIF(GLUT_INCLUDE_DIR)
MARK_AS_ADVANCED( MARK_AS_ADVANCED(
GLUT_INCLUDE_DIR GLUT_INCLUDE_DIR