diff options
author | David Cole <david.cole@kitware.com> | 2012-02-21 20:54:19 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2012-02-21 20:54:19 (GMT) |
commit | e17f270b7acdfc5e6cfd3179a9f48da53a258996 (patch) | |
tree | 761055a20e2b90fec60ae6a5ddfd3d20cb6ac3e7 | |
parent | cee42a73e8809ffb0bd877a121d0c042530f8018 (diff) | |
parent | 14dadbde809d5091de44ef880376f69f6be2e23e (diff) | |
download | CMake-e17f270b7acdfc5e6cfd3179a9f48da53a258996.zip CMake-e17f270b7acdfc5e6cfd3179a9f48da53a258996.tar.gz CMake-e17f270b7acdfc5e6cfd3179a9f48da53a258996.tar.bz2 |
Merge topic 'improve-findglut'
14dadbd FindGLUT: honor REQUIRED (#12466)
-rw-r--r-- | Modules/FindGLUT.cmake | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake index af88997..8205779 100644 --- a/Modules/FindGLUT.cmake +++ b/Modules/FindGLUT.cmake @@ -64,25 +64,23 @@ ELSE (WIN32) ENDIF (WIN32) -SET( GLUT_FOUND "NO" ) -IF(GLUT_INCLUDE_DIR) - IF(GLUT_glut_LIBRARY) - # Is -lXi and -lXmu required on all platforms that have it? - # If not, we need some way to figure out what platform we are on. - SET( GLUT_LIBRARIES - ${GLUT_glut_LIBRARY} - ${GLUT_Xmu_LIBRARY} - ${GLUT_Xi_LIBRARY} - ${GLUT_cocoa_LIBRARY} - ) - SET( GLUT_FOUND "YES" ) - - #The following deprecated settings are for backwards compatibility with CMake1.4 - SET (GLUT_LIBRARY ${GLUT_LIBRARIES}) - SET (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR}) +INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLUT REQUIRED_VARS GLUT_glut_LIBRARY GLUT_INCLUDE_DIR) + +IF (GLUT_FOUND) + # Is -lXi and -lXmu required on all platforms that have it? + # If not, we need some way to figure out what platform we are on. + SET( GLUT_LIBRARIES + ${GLUT_glut_LIBRARY} + ${GLUT_Xmu_LIBRARY} + ${GLUT_Xi_LIBRARY} + ${GLUT_cocoa_LIBRARY} + ) - ENDIF(GLUT_glut_LIBRARY) -ENDIF(GLUT_INCLUDE_DIR) + #The following deprecated settings are for backwards compatibility with CMake1.4 + SET (GLUT_LIBRARY ${GLUT_LIBRARIES}) + SET (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR}) +ENDIF(GLUT_FOUND) MARK_AS_ADVANCED( GLUT_INCLUDE_DIR |