[vtkusers] VTK/CMake configuration problem

Alexandre Guimond vtk at guim.org
Sun Dec 15 14:41:16 EST 2002


Hi.  I'm trying to compile VTK 4 from cvs.  First thing I did is install
CMake from cvs.  Amongst other things, CMake install created 

/home/guimond/share/CMake/Modules
/home/guimond/share/CMake/Templates

I then tried to build VTK.  I got the following errors from cmake:

-- Compiling VTK loaded commands
-- Compiling VTK loaded commands - failed
failed to compile VTK extensions to CMake
CMake Error: Attempt to add link libraries to non-existant target: pvtkpython for lib /usr/lib/libutil.so
CMake Error: Attempt to add link directories to non-existant target: pvtkpython for directory /home/guimond/work/VTK/bin
-- Configuring done

The one I'm most concerned about is the second line:

-- Compiling VTK loaded commands - failed

This one happens it seems because VTK/CMake/CMakeLists.txt contains:

INCLUDE_DIRECTORIES(${CMAKE_ROOT}/include ${CMAKE_ROOT}/Source)

For me, ${CMAKE_ROOT} is /home/guimond/share/CMake.  It doesn't
contain either an include or a Source directory.  The Source directory
is where I checked-out the CMake source, ie /home/guimond/work/CMake.
I had a closer look at the build error in VTK/CMake, and it happens
because VTK/CMake/cmVTKMakeInstantiator2Command.c includes
cmCPluginAPI.h, which is in /home/guimond/work/CMake/Source.
Hence, I had to modify that line to:

INCLUDE_DIRECTORIES(${CMAKE_ROOT}/include ${CMAKE_ROOT}/Source /home/guimond/work/CMake/Source)

That's obviously a quick fix, but doens't make much sense.  Can anyone
tell me what I'm doing wrong?  Shouldn't CMake create an include dir
under CMAKE_ROOT?  What option should I specify for that to happen?

thx for any help.



More information about the vtkusers mailing list