FindGLU.cmake 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. #
  2. # Try to find GLU, once done this will define:
  3. #
  4. # GLU_INCLUDE_PATH = where the GLU include directory can be found
  5. # GLU_LIBRARY = the name of the GLU library to link with
  6. #
  7. IF (WIN32)
  8. IF(BORLAND)
  9. SET (GLU_LIBRARY import32 CACHE STRING "GLU library for win32")
  10. ELSE(BORLAND)
  11. SET (GLU_LIBRARY glu32 CACHE STRING "GLU library for win32")
  12. ENDIF(BORLAND)
  13. ELSE (WIN32)
  14. IF (APPLE)
  15. # The GLU lib is included in the OpenGL framework. We can not
  16. # set GLU_LIBRARY to an empty string since it is equal to FALSE if
  17. # this variable is used in a IF test. So let's set it to the OpenGL
  18. # framework. It does not harm to duplicate the OpenGL framework and it
  19. # might even help in case OPENGL_LIBRARY is not set.
  20. SET(GLU_LIBRARY "-framework Carbon -framework AGL -framework OpenGL" CACHE STRING "GLU library for OSX")
  21. ELSE (APPLE)
  22. FIND_PATH(GLU_INCLUDE_PATH GL/glu.h
  23. ${OPENGL_INCLUDE_PATH}
  24. /usr/include
  25. /usr/local/include
  26. /usr/openwin/share/include
  27. /opt/graphics/OpenGL/include
  28. /usr/X11R6/include
  29. )
  30. MARK_AS_ADVANCED(
  31. GLU_INCLUDE_PATH
  32. )
  33. FIND_LIBRARY(GLU_LIBRARY GLU
  34. ${OPENGL_LIBRARY_PATH}
  35. /usr/lib
  36. /usr/local/lib
  37. /opt/graphics/OpenGL/lib
  38. /usr/openwin/lib
  39. /usr/X11R6/lib
  40. )
  41. ENDIF (APPLE)
  42. ENDIF (WIN32)
  43. MARK_AS_ADVANCED(
  44. GLU_LIBRARY
  45. )