FindOpenGL.cmake 798 B

1234567891011121314151617181920212223242526272829303132
  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. FIND_PATH(OPENGL_INCLUDE_PATH GL/gl.h
  16. /usr/include
  17. /usr/local/include
  18. /usr/openwin/share/include
  19. /opt/graphics/OpenGL/include
  20. /usr/X11R6/include
  21. )
  22. FIND_LIBRARY(OPENGL_LIBRARY GL
  23. /usr/lib
  24. /usr/local/lib
  25. /opt/graphics/OpenGL/lib
  26. /usr/openwin/lib
  27. /usr/X11R6/lib
  28. )
  29. ENDIF (WIN32)