MantisBT - CMake
View Issue Details
0007437CMakeModulespublic2008-08-01 09:452008-10-01 13:31
Andrew Hunter 
Bill Hoffman 
normalmajoralways
closedunable to reproduce 
CMake-2-6 
 
0007437: FindGLUT.cmake does not work on *nix systems
Currently FindGLUT.cmake does work on *nix systems.

The FINDPATH() function incorectly adds a GL/ prefix on glut.h which is not needed when /usr/include/GL is searched.

Also, FIND_LIBRARY() only searches /usr/openwin/lib which also breaks on *nix systems such as Ubuntu.

I will get a patch made to fix these issues posted soon.
No tags attached.
patch FindGLUT-nix.patch (1,133) 2008-08-01 10:14
https://public.kitware.com/Bug/file/1636/FindGLUT-nix.patch
Issue History
2008-08-01 09:45Andrew HunterNew Issue
2008-08-01 10:14Andrew HunterFile Added: FindGLUT-nix.patch
2008-08-01 10:15Andrew HunterNote Added: 0012918
2008-08-19 14:16Bill HoffmanNote Added: 0013068
2008-08-19 14:16Bill HoffmanStatusnew => assigned
2008-08-19 14:16Bill HoffmanAssigned To => Bill Hoffman
2008-10-01 13:31Bill HoffmanStatusassigned => closed
2008-10-01 13:31Bill HoffmanResolutionopen => unable to reproduce

Notes
(0012918)
Andrew Hunter   
2008-08-01 10:15   
Attached patch which fixes issue. Tested on Ubuntu Intrepid Ibex.
(0013068)
Bill Hoffman   
2008-08-19 14:16   
This stuff should automatically be searched by cmake:

/usr/include
+ /usr/local/include /usr/lib
+ /usr/local/lib

I think the only change you need is:

- FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h
+ FIND_PATH( GLUT_INCLUDE_DIR glut.h
+ PATH_SUFFIXES GL/

Can you verify that that works for you?

Thanks.