[vtkusers] Building VTK on MAC OSX

Sander Niemeijer niemeijer at science-and-technology.nl
Tue Apr 23 13:53:51 EDT 2002


Hi Daniel,

If you want to compile for Quartz then you don't have to change the 
__APPLE__ definition checks to VTK_USE_QUARTZ. If you do apply the 
changes then one extra thing has to be added in order to get compiling 
for Quartz to work again. In the Rendering/CMakeLists.txt you have to 
add the line
---
ADD_DEFINITIONS(-DVTK_USE_QUARTZ)
--
in the 'IF (APPLE) IF (VTK_USE_QUARTZ)' section.

Maybe a good time to summarize the possibillities you can use at the 
moment and how to get them to work:

- If you have VTK 4.0 and want to compile with Quartz support then all 
you have to do is set VTK_USE_QUARTZ to ON, VTK_USE_X to OFF and set the 
OPENGL_LIBRARY to -framework Appkit -framework OpenGL. (No need to 
change the __APPLE__ definition checks)

- If you use the CVS version of VTK and want to compile with Quartz 
support then the OPENGL_LIBRARY setting will automatically be set 
properly (make sure that you also use the CVS version of CMake! And 
again no need to change the __APPLE__ defintion checks).

- If you have VTK 4.0 and want to compile with X11 support then follow 
the instructions you found in the mailinglist archive and add the 
ADD_DEFINITIONS setting so you will also be able to compile with Quartz 
support from the same sourcetree.

- If you use the CVS version of VTK and want to compile with X11 support 
then please have some patience (or drop me an e-mail if you really can't 
wait ;-). As I understood from Yves, he will soon be adding the patch to 
CVS that will support both X11 and Quartz builds of VTK on Mac OS X.

Regards,
Sander

On dinsdag, april 23, 2002, at 06:50 , Daniel Sáez Domingo wrote:

> Hello,
>
>    I am new in VTK's world. I have tried to build VTK on a MAC OS X 
> but I
> have had a lot of problems.
> I have read the archives and I think my problem isn't solved there.
>
> I have done all the changes in the Rendering directory files (__APPLE__ 
> by
> VTK_USE_QUARTZ) and in the CMakeList.txt and the options in 
> CMakeCache.txt are
> OPENGL_LIBRARY:FILEPATH=-framework AppKit -framework OpenGL
> VTK_USE_QUARTZ:BOOL=ON
> VTK_USE_RENDERING:BOOL=ON
> VTK_USE_X:BOOL=OFF
>
> but when I do make, it is produced the next error:
> /usr/local/src/VTK/Rendering/vtkOpenGLActor.cxx:50: GL/gl.h: No such 
> file or
> directory
>
>
> I have looked for the gl.h in my system and I've found the next file:
>
> /System/Library/Frameworks/OpenGL.frameworks/Versions/A/Headers/gl.h
>
> then, I have put this directory in the OPENGL_INCLUDE_PATH
>
> but the problem continues.
>
> I would like someone to help me, please.
>
> Thank you
>
> Daniel Sáez.
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: 
> <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>




More information about the vtkusers mailing list