[vtkusers] Specifying VTK Path in CMakeLists.txt

John Drescher drescherjm at gmail.com
Sat Apr 11 10:16:02 EDT 2009


> Ok, I set VTK_DIR in my environment:
>
> [doriad at davedesktop LandmarkTransform]$ echo $VTK_DIR
> /home/doriad/bin/ParaView3/VTK
>
> and then just used this in CMakeLists.txt
> INCLUDE(${VTK_DIR}/UseVTK.cmake)
>
> and it still gives me the same
>
> ------------
>  CMake Error at CMakeLists.txt:43 (INCLUDE):
>    include could not find load file:
>
>      /UseVTK.cmake
> ------------
>

You want to get rid of the INCLUDE(${VTK_DIR}/UseVTK.cmake) and put it
back to the original.

FIND_PACKAGE(VTK REQUIRED)
INCLUDE(${VTK_USE_FILE})

The finder for VTK will look for VTK_DIR in the environment and use
that if found.

John



More information about the vtkusers mailing list