[vtk-developers] CMake

Brad King brad.king at kitware.com
Mon Nov 3 17:26:26 EST 2003


On Sat, 1 Nov 2003, Robert Belleman wrote:

> Why is that cmake installs .so libraries *both* in
> EXECUTABLE_OUTPUT_PATH *and* LIBRARY_OUTPUT_PATH/vtk (note the added
> directory "vtk") and not just (and only) in LIBRARY_OUTPUT_PATH?

VTK works from either the build tree or an installed tree.
LIBRARY_OUTPUT_PATH and EXECUTABLE_OUTPUT_PATH only affect the build tree
and should be left unchanged.  They have been left as advanced options
only for historical reasons.

Running "make install" copies the headers and libraries to an installation
tree under the directory specified by CMAKE_INSTALL_PREFIX.  Libraries are
installed under prefix/lib/vtk instead of prefix/lib because there are no
version numbers on the library names.  This will eventually be resolved,
but has not yet been implemented.

> Why is that cmake installs include files in
> CMAKE_INSTALL_PREFIX/include/vtk and not in
> CMAKE_INSTALL_PREFIX/include? (it's not that C++ programs use #include
> "vtk/vtkXXX.h", just #include "vtkXXX.h")

The full VTK has almost 900 header files.  We do not want to overwhelm a
top-level include directory.  VTK-aware programs should use a -I option to
the compiler to specify the proper path.  If the third-party program is
built with CMake, then include paths are added automatically by VTK's
packaging code.

Yes, we know programs could use #include "vtk/vtkXXX.h", but we do not do
this for historical reasons.

> Why is that cmake recompiles every single source file again when the
> only thing I changed is an installation output path?

This may be a bug.  Please provide more details for what you changed
between builds.

> This is with cmake version 1.9.0 on linux.

This is a development version from CVS.  Please use the latest release
available on the web page (currently 1.8.1).

-Brad




More information about the vtk-developers mailing list