diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2003-01-15 20:02:21 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2003-01-15 20:02:21 (GMT) |
commit | 724c74122fad268e874f0ea1bedf6cb1d3e79096 (patch) | |
tree | f1841ecbdc9738f6f93b1c3c6d75e03472f92e0f /Modules/FindOpenGL.cmake | |
parent | c01253a58fa208563f2becb7944ccb43b1679849 (diff) | |
download | CMake-724c74122fad268e874f0ea1bedf6cb1d3e79096.zip CMake-724c74122fad268e874f0ea1bedf6cb1d3e79096.tar.gz CMake-724c74122fad268e874f0ea1bedf6cb1d3e79096.tar.bz2 |
BUG: fix for OSX with x11 gl stuff
Diffstat (limited to 'Modules/FindOpenGL.cmake')
-rw-r--r-- | Modules/FindOpenGL.cmake | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/Modules/FindOpenGL.cmake b/Modules/FindOpenGL.cmake index 6666898..04a8223 100644 --- a/Modules/FindOpenGL.cmake +++ b/Modules/FindOpenGL.cmake @@ -13,6 +13,14 @@ # OPENGL_glu_LIBRARY - Path to GLU Library # +# On OSX default to using the framework version of opengl +# People will have to change the cache values of OPENGL_glu_LIBRARY and OPENGL_gl_LIBRARY +# to use OpenGL with X11 on OSX +IF (APPLE) + SET (OPENGL_gl_LIBRARY "-framework OpenGL" CACHE STRING "OpenGL lib for OSX") + SET (OPENGL_glu_LIBRARY "-framework AGL" CACHE STRING "AGL lib for OSX") +ENDIF (APPLE) + IF (WIN32) IF (CYGWIN) @@ -132,17 +140,6 @@ ENDIF(OPENGL_gl_LIBRARY) SET(OPENGL_INCLUDE_PATH ${OPENGL_INCLUDE_DIR}) -# On OSX, OpenGL is always there - this will need refining for those -# using OpenGL with X11 - -IF (APPLE) - SET (OPENGL_FOUND "YES") - SET (OPENGL_GLU_FOUND "YES") - SET (OPENGL_LIBRARIES "-framework AGL -framework OpenGL" CACHE STRING "OpenGL lib for OSX") - SET (OPENGL_LIBRARY "${OPENGL_LIBRARIES}" CACHE STRING "OpenGL lib for OSX (for CMake 1.4)") - SET (OPENGL_gl_LIBRARY "-framework OpenGL" CACHE STRING "OpenGL lib for OSX") - SET (OPENGL_glu_LIBRARY "-framework AGL" CACHE STRING "AGL lib for OSX") -ENDIF (APPLE) MARK_AS_ADVANCED( OPENGL_INCLUDE_DIR |