FindOpenGL.cmake 1002 B

1234567891011121314151617181920212223242526272829303132333435
  1. #
  2. # try to find OpenGL on UNIX systems once done this will define
  3. #
  4. # OPENGL_INCLUDE_PATH = where the GL include directory can be found
  5. # OPENGL_LIB_PATH = where the GL library can be found
  6. # OPENGL_LIBRARY = the name of the OpenGL library to link with
  7. #
  8. IF (WIN32)
  9. IF(BORLAND)
  10. SET (OPENGL_LIBRARY import32 CACHE STRING "OpenGL library for win32")
  11. ELSE(BORLAND)
  12. SET (OPENGL_LIBRARY opengl32 CACHE STRING "OpenGL library for win32")
  13. ENDIF(BORLAND)
  14. ELSE (WIN32)
  15. IF (APPLE)
  16. SET(OPENGL_LIBRARY "-framework Carbon -framework AGL -framework OpenGL" CACHE STRING "OpenGL library for OSX")
  17. ELSE (APPLE)
  18. FIND_PATH(OPENGL_INCLUDE_PATH GL/gl.h
  19. /usr/include
  20. /usr/local/include
  21. /usr/openwin/share/include
  22. /opt/graphics/OpenGL/include
  23. /usr/X11R6/include
  24. )
  25. FIND_LIBRARY(OPENGL_LIBRARY GL
  26. /usr/lib
  27. /usr/local/lib
  28. /opt/graphics/OpenGL/lib
  29. /usr/openwin/lib
  30. /usr/X11R6/lib
  31. )
  32. ENDIF (APPLE)
  33. ENDIF (WIN32)