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")
53 FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h
57 /usr/openwin/share/include
61 /opt/graphics/OpenGL/include
62 /opt/graphics/OpenGL/contrib/libglut
65 FIND_LIBRARY( GLUT_glut_LIBRARY glut
72 FIND_LIBRARY( GLUT_Xi_LIBRARY Xi
79 FIND_LIBRARY( GLUT_Xmu_LIBRARY Xmu
90 SET( GLUT_FOUND "NO" )
93 # Is -lXi and -lXmu required on all platforms that have it?
94 # If not, we need some way to figure out what platform we are on.
100 SET( GLUT_FOUND "YES" )
102 #The following deprecated settings are for backwards compatibility with CMake1.4
103 SET (GLUT_LIBRARY ${GLUT_LIBRARIES})
104 SET (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR})
106 ENDIF(GLUT_glut_LIBRARY)
107 ENDIF(GLUT_INCLUDE_DIR)