[vtk-developers] VTK / cmake problems

Brad King brad.king at kitware.com
Fri Jan 3 09:38:13 EST 2003


Hi Bill,

> However, it seems to me that VTK_SOURCE_DIR, TCL_LIBRARY and all tcl/tk
> related cmake variabl;es should not be excluded in UseVTK.cmake.in.

The LOAD_CACHE that is done there is only to simulate the real solution
that is implemented for CMake 1.6 (when it is released).  The idea is to
make VTK opaque to projects using it in that using it from the build tree
and from the install tree should be the same.  Therefore, VTK_SOURCE_DIR
cannot be set because it isn't available from the install tree.

For TCL_LIBRARY, if your project links to vtkCommonTCL, it will get the
Tcl library automatically.  If UseVTK has been included, it will also get
the proper include paths automatically.  Look at

  VTK/Examples/Build/vtkLocal

for an example of a project that uses VTK with Tcl wrapping.

If an independent library in your project links to TCL on its own, then it
is not VTK's responsibility to tell your project where to find TCL.  It
should have its own use of the FindTCL CMake module.  However, as the
above example shows, your project can do Tcl wrapping without using
FindTCL.  Linking to vtkCommonTCL is enough to get all the Tcl symbols it
needs.  This is necessary anyway since the vtk Tcl wrappers depend on some
VTK symbols from that library.

-Brad




More information about the vtk-developers mailing list