[Cmake] Problem with LoadCommand

Brad King brad.king at kitware.com
Mon Jan 6 09:39:51 EST 2003


> When a project uses vtk by loading the FindVTK module and then inclusing
> the correct USE_VTK file, the use vtk stuff doesn't load any custom
> commands that vtk uses, like VTK_WRAP_TCL2.

This will only work with CMake from CVS, of course, but this is what you
want to do after including the FindVTK.cmake module:

INCLUDE(${VTK_CMAKE_EXTENSIONS_DIR}/vtkLoadCMakeExtensions.cmake)
VTK_LOAD_CMAKE_EXTENSIONS(${VTK_CMAKE_EXTENSIONS_DIR}
                          ${PROJECT_BINARY_DIR}/VTKCMake)

The "${PROJECT_BINARY_DIR}/VTKCMake" should be a unique directory in your
project's build tree that is not part of the rest of the build.

There is no documentation for this yet because CMake 1.6 has not yet been
released.  Once it is available, we can up the requirement for VTK and add
a full example for doint this.

-Brad




More information about the CMake mailing list