diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2008-03-13 14:56:40 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2008-03-13 14:56:40 (GMT) |
commit | 0deb9012a671760abce575d983dfa9cb49b2205f (patch) | |
tree | 09f87e2d9aa482029611f37df8058862cc256e46 /Modules/FindGLUT.cmake | |
parent | cddb1346b7426e4693927b41637f43919f0174f7 (diff) | |
download | CMake-0deb9012a671760abce575d983dfa9cb49b2205f.zip CMake-0deb9012a671760abce575d983dfa9cb49b2205f.tar.gz CMake-0deb9012a671760abce575d983dfa9cb49b2205f.tar.bz2 |
BUG: fix bug 6594 look for glut in more places on windows
Diffstat (limited to 'Modules/FindGLUT.cmake')
-rw-r--r-- | Modules/FindGLUT.cmake | 63 |
1 files changed, 23 insertions, 40 deletions
diff --git a/Modules/FindGLUT.cmake b/Modules/FindGLUT.cmake index ad1d5b5..74b7ff1 100644 --- a/Modules/FindGLUT.cmake +++ b/Modules/FindGLUT.cmake @@ -8,63 +8,46 @@ # GLUT_Xi_LIBRARY = the full path to the Xi Library. IF (WIN32) - - IF(CYGWIN) - - FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h ) - - FIND_LIBRARY( GLUT_glut_LIBRARY glut32 - ${OPENGL_LIBRARY_DIR} + FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h + PATHS ${GLUT_ROOT_PATH}/include ) + FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut glut32 + ${OPENGL_LIBRARY_DIR} + ${GLUT_ROOT_PATH}/Release ) - - - ELSE(CYGWIN) - - FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h - ${GLUT_ROOT_PATH}/include - ) - - FIND_LIBRARY( GLUT_glut_LIBRARY glut - ${GLUT_ROOT_PATH}/Release - ${OPENGL_LIBRARY_DIR} - ) - - ENDIF(CYGWIN) - ELSE (WIN32) - + IF (APPLE) -# These values for Apple could probably do with improvement. + # These values for Apple could probably do with improvement. FIND_PATH( GLUT_INCLUDE_DIR glut.h /System/Library/Frameworks/GLUT.framework/Versions/A/Headers ${OPENGL_LIBRARY_DIR} - ) + ) SET(GLUT_glut_LIBRARY "-framework GLUT" CACHE STRING "GLUT library for OSX") SET(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX") ELSE (APPLE) - + FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h /usr/include/GL /usr/openwin/share/include /usr/openwin/include /opt/graphics/OpenGL/include /opt/graphics/OpenGL/contrib/libglut - ) - + ) + FIND_LIBRARY( GLUT_glut_LIBRARY glut /usr/openwin/lib - ) - + ) + FIND_LIBRARY( GLUT_Xi_LIBRARY Xi /usr/openwin/lib - ) - + ) + FIND_LIBRARY( GLUT_Xmu_LIBRARY Xmu /usr/openwin/lib - ) - + ) + ENDIF (APPLE) - + ENDIF (WIN32) SET( GLUT_FOUND "NO" ) @@ -77,13 +60,13 @@ IF(GLUT_INCLUDE_DIR) ${GLUT_Xmu_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_INCLUDE_PATH ${GLUT_INCLUDE_DIR}) - + ENDIF(GLUT_glut_LIBRARY) ENDIF(GLUT_INCLUDE_DIR) @@ -92,4 +75,4 @@ MARK_AS_ADVANCED( GLUT_glut_LIBRARY GLUT_Xmu_LIBRARY GLUT_Xi_LIBRARY -) + ) |