[vtkusers] CMake Error: VTKConfig.cmake not found

Amy Squillacote ahs at cfdrc.com
Wed Jan 30 09:30:17 EST 2008


Hi Alok,

Did you build VTK before trying to build the examples? The pre-compiled 
version of VTK works with Tcl; I'm assuming this is what you've 
installed based on #3 below. In order to use VTK from C++, you must 
build it from source. Download the VTK source code from the VTK web 
site; create a separate build directory for VTK; then use CMake to 
create appropriate Makefiles or workspace files for VTK; and finally 
build VTK. Once you have built VTK, then you should be able to compile 
and run the examples. The VTKConfig.cmake file will be in the top level 
of your VTK build tree once VTK has been compiled.

- Amy

Alok Whig wrote:
> Hello Dear members, I am a newbie to VTK and CMake. As the subject 
> states, my problems deals with the CMake error indicating about the 
> non availability of VTKConfig.cmake file.
>
> Precisely, I am doing following:
> 1. Installed VTK and Cmake in separate directories.
> 2. Followed instructions as given on www.vtk.org <http://www.vtk.org>.
> 3. I am trying to run examples.Source files being Cxx. (Note ,I am 
> able to run tcl script files directly with VTK)
> 4. When I choose source and build directories, and press Configure 
> then following message appears:
> "*Cmake Error: VTK not found.Set VTK_DIR cmake cache entry to the 
> directory containing VTKConfig.cmake.This is either the root of the 
> build tree or PREFIX.lib/vtk for an installation"
>
> *I have searched all directories of the installation but no success. 
> All I can see files that have similar names viz:
> vtkGenerateVTKConfig.cmake
> vtkConfigure.h.in <http://vtkConfigure.h.in>
> VTKConfig.cmake.in <http://VTKConfig.cmake.in>
>
> 5. As a hit and trial , I removed extension "in" from the last file( 
> as above) to make it VKConfig.cmake but no success.
> 6. I was able to run Hello World example with CMake.
> 7. Kindly guide me.
> (PS: since the archive is huge, I have not searched every post) If 
> this post is new please answer else give the reference ( link) of 
> archived mail if already asked before.
> Thank you.
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> This is the private VTK discussion list. 
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>   




More information about the vtkusers mailing list