2 # try to find glut library and include files
4 # GLUT_INCLUDE_DIR, where to find GL/glut.h, etc.
5 # GLUT_LIBRARIES, the libraries to link against to use GLUT.
6 # GLUT_FOUND, If false, do not try to use GLUT.
8 # also defined, but not for general use are
9 # GLUT_glut_LIBRARY = the full path to the glut library.
10 # GLUT_Xmu_LIBRARY = the full path to the Xmu library if available.
11 # GLUT_Xi_LIBRARY = the full path to the Xi Library if available.
17 FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h
21 FIND_LIBRARY( GLUT_glut_LIBRARY glut32
32 FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h
33 ${GLUT_ROOT_PATH}/include
36 FIND_LIBRARY( GLUT_glut_LIBRARY glut
37 ${GLUT_ROOT_PATH}/Release
46 # These values for Apple could probably do with improvement.
47 FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h
50 SET(GLUT_glut_LIBRARY "-framework Glut" CACHE STRING "GLUT library for OSX")
51 SET(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
54 FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h
58 /usr/openwin/share/include
62 /opt/graphics/OpenGL/include
63 /opt/graphics/OpenGL/contrib/libglut
66 FIND_LIBRARY( GLUT_glut_LIBRARY glut
73 FIND_LIBRARY( GLUT_Xi_LIBRARY Xi
80 FIND_LIBRARY( GLUT_Xmu_LIBRARY Xmu
91 SET( GLUT_FOUND "NO" )
94 # Is -lXi and -lXmu required on all platforms that have it?
95 # If not, we need some way to figure out what platform we are on.
100 ${GLUT_cocoa_LIBRARY}
102 SET( GLUT_FOUND "YES" )
104 #The following deprecated settings are for backwards compatibility with CMake1.4
105 SET (GLUT_LIBRARY ${GLUT_LIBRARIES})
106 SET (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR})
108 ENDIF(GLUT_glut_LIBRARY)
109 ENDIF(GLUT_INCLUDE_DIR)