[vtkusers] CMake Issues

Bob Palank bob at stlcc.org
Tue Jul 12 16:43:36 EDT 2011


I have used CMake and VC++ 2010 Express to build about four successful
examples.

The following cMakeLists.txt file data worked fine for the Cylinder example.

 

cmake_minimum_required(VERSION 2.6)

PROJECT(Cylinder)

FIND_PACKAGE(VTK REQUIRED)

INCLUDE(${VTK_USE_FILE})

ADD_EXECUTABLE(Cylinder Cylinder.cpp)

TARGET_LINK_LIBRARIES(Cylinder vtkHybrid)

================================================

Now I try to replicate the Cylinder example with a new cMakeLists.txt in a 

new project folder called  Cylinder2 using  ( the folder contains
Cylinder2.cpp and the cMakeLists.txt file and the bin directory 

 

cmake_minimum_required(VERSION 2.6)

PROJECT(Cylinder2)

FIND_PACKAGE(VTK REQUIRED)

INCLUDE(${VTK_USE_FILE})

ADD_EXECUTABLE(Cylinder2 Cylinder2.cpp)

TARGET_LINK_LIBRARIES(Cylinder2 vtkHybrid)

===================================================

When I configure, here is what CMake reports:

Check for working C compiler using: Visual Studio 10

Check for working C compiler using: Visual Studio 10 -- works

Detecting C compiler ABI info

Detecting C compiler ABI info - done

Check for working CXX compiler using: Visual Studio 10

Check for working CXX compiler using: Visual Studio 10 -- works

Detecting CXX compiler ABI info

Detecting CXX compiler ABI info - done

CMake Error at D:/Program Files/CMake
2.8/share/cmake-2.8/Modules/FindVTK.cmake:135 (MESSAGE):

  VTK not found.  Set the 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.  For VTK 4.0, this is the location of

  UseVTK.cmake.  This is either the root of the build tree or

  PREFIX/include/vtk for an installation.

Call Stack (most recent call first):

  CMakeLists.txt:4 (FIND_PACKAGE)

 

 

Configuring incomplete, errors occurred!

-----------------------------------------------------------------

Nothing was moved so why is VTK not found.

Why would I need to Set the VTK_DIR cmake cache entry and how would I do it

since I didn't do it on the previous examples ?

What went wrong? 
Any suggestions ?

Bob

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110712/8eb5d481/attachment.htm>


More information about the vtkusers mailing list