These are the setting required for building against Freesurfer: BUILD_EXAMPLES OFF BUILD_SHARED_LIBS ON CMAKE_BUILD_TYPE Release CMAKE_INSTALL_PREFIX /usr/pubsw/packages/vtk/5.0.2 TCL_INCLUDE_PATH /usr/pubsw/packages/tcltktixblt/current/include TCL_LIBRARY /usr/pubsw/packages/tcltktixblt/current/lib/libtcl8.4.so TK_INCLUDE_PATH /usr/pubsw/packages/tcltktixblt/current/include TK_LIBRARY /usr/pubsw/packages/tcltktixblt/current/lib/libtk8.4.so VTK_DATA_ROOT /usr/pubsw/packages/vtk/5.0.2/src/VTKData VTK_USE_PARALLEL OFF VTK_USE_RENDERING ON VTK_USE_RPATH OFF VTK_USE_SYSTEM_EXPAT ON VTK_USE_SYSTEM_FREETYPE ON VTK_USE_SYSTEM_JPEG ON VTK_USE_SYSTEM_PNG ON VTK_USE_SYSTEM_TIFF ON VTK_USE_SYSTEM_ZLIB ON VTK_USE_TK ON VTK_WRAP_JAVA OFF VTK_WRAP_PYTHON OFF VTK_WRAP_TCL ON BUILD_SHARED_LIBS=ON and VTK_WRAP_TCL=ON are necessary to allow KWWidgets to build. Notice also the Tcl and Tk are pointing at the Tcl/Tk libs that Freesurfer uses, ensuring fullest compatibility.