<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br class="webkit-block-placeholder"></div><div><br><br>There are still some OpenGL bugs in Mac OS X Leopard preventing proper compilation of VTK 5.0.3 (and the CVS version). A workaround for Paraview was posted on the mailing list, and based on it I was able to create a fix for VTK. The Paraview fix is:<br><br><a href="http://public.kitware.com/pipermail/paraview/2007-October/006141.html">http://public.kitware.com/pipermail/paraview/2007-October/006141.html</a><br><br><br>The fix for VTK is as follow (assuming something like that has not been posted already):<br><br>Modify the Top Level CmakeLists.txt file in the IF(VTK_USE_RENDERING) section as follow:<br><br>insert the lines:<br>IF ( OSX_LEOPARD_OPENGL_FIX )<br> SET (CMAKE_EXE_LINKER_FLAGS "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")<br> SET (CMAKE_SHARED_LINKER_FLAGS "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")<br>ENDIF ( OSX_LEOPARD_OPENGL_FIX )<br><br>and just before the IF(VTK_USE_RENDERING) section, insert the line:<br>OPTION(OSX_LEOPARD_OPENGL_FIX "Adds Linker arguments needed to correctly select the X11 OpenGL Library" TRUE)<br><br>so that the end result is:<br><br>#-----------------------------------------------------------------------------<br># Configure OpenGL support.<br><br>OPTION(OSX_LEOPARD_OPENGL_FIX "Adds Linker arguments needed to correctly select the X11 OpenGL Library" TRUE)<br>IF(VTK_USE_RENDERING)<br># At the moment CMake's FindOpenGL considers OpenGL should be found<br># in the framework version on OSX. This is a reasonable assumption for<br># few people are going to use X. The module warns that if X is to be<br># used, one has to set the libs and include dir manually, which is<br># exactly what we are going to do below.<br>IF(APPLE AND VTK_USE_X)<br> FIND_PATH(OPENGL_INCLUDE_DIR GL/gl.h<br> /usr/X11R6/include)<br> FIND_PATH(OPENGL_xmesa_INCLUDE_DIR GL/xmesa.h<br> /usr/X11R6/include)<br> FIND_LIBRARY(OPENGL_gl_LIBRARY NAMES GL MesaGL<br> PATHS /usr/lib /usr/local/lib /usr/X11R6/lib)<br> FIND_LIBRARY(OPENGL_glu_LIBRARY NAMES GLU MesaGLU<br> PATHS ${OPENGL_gl_LIBRARY} /usr/lib /usr/local/lib /usr/X11R6/lib)<br><span class="Apple-tab-span" style="white-space: pre; ">        </span> IF ( OSX_LEOPARD_OPENGL_FIX )<br> SET (CMAKE_EXE_LINKER_FLAGS "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")<br> SET (CMAKE_SHARED_LINKER_FLAGS "-Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib")<br><span class="Apple-tab-span" style="white-space: pre; ">        </span> ENDIF ( OSX_LEOPARD_OPENGL_FIX )<br>ENDIF(APPLE AND VTK_USE_X)<br>FIND_PACKAGE(OpenGL)<br>ENDIF(VTK_USE_RENDERING)<br><br>VTK_PREPARE_CMAKEDEFINE("" OPENGL_LIBRARY VTK_USE_OPENGL_LIBRARY)<br><br>#-----------------------------------------------------------------------------<br><br>It worked very well for me. I use VMTK which requires the X11 version of VTK.<br>There are no problems in compiling the Carbon or Cocoa versions of VTK on<br>the Mac OS X Leopard.<br><br>Benoit Desajrdins<br><br><br><br>--------------------------------------------------------------<br>Benoit Desjardins, MD, PhD<br>Assistant Professor of Radiology<br>Director, Cardiovascular MR/CT Research Lab<br>Department of Radiology<br>University of Michigan<br>1500 E. Medical Center Dr, B2-A209R<br>Ann Arbor, MI 48109-0030<br>USA<br><br>Phone: +1 (734) 647-3037<br>FAX: +1 (734) 764-2412<br>Pager: +1 (734) 566-5847<br>iPhone: +1 (734) 730-7258<br>email: <a href="mailto:benoitd@umich.edu">benoitd@umich.edu</a><br>web: <a href="http://cvmrct.med.umich.edu/">http://cvmrct.med.umich.edu</a><br>video: <a href="mailto:bd_md_phd@mac.com">bd_md_phd@mac.com</a> (iChat or AIM)<br>--------------------------------------------------------------<br><br><br><br><br><br><br></div></body></html>