Wednesday, November 10, 2010

Building VTK with QT on a Mac

VTK libraries are built in a similar fashion as VXL. You will need Cmake installed and create directories fro source and build.
The configuration for using VTK with QT are borrowed from here
In summary:

  1. Grab Qt 4.5.3 here.
  2. Launch CMake. Set the build directory to where you want to build VTK and the source directory to the VTK source tree.
  3. Turn on the following options:
    1. BUILD_SHARED_LIBS
    2. VTK_USE_QT
    3. VTK_USE_CARBON
    4. VTK_USE_GUISUPPORT
  4. Turn off the VTK_USE_COCOA option.
  5. Click “Configure”.
  6. Set DESIRED_QT_VERSION to 4.
  7. Click “Configure” again.
  8. Turn on VTK_USE_QVTK_QTOPENGL
  9. Click “Configure” yet again.
  10. Click “Generate”.