[Insight-users] VTK and ITK together - simple CmakeLists.txt example?

Rick Frank rickf at fullspectrumsw.com
Fri Oct 7 12:41:02 EDT 2011


Hi

 

I'm trying to configure and generate a simple Visual Studio 10 project
to use VTK and ITK together.

 

Here is my CmakeLists.txt file.

 

cmake_minimum_required(VERSION 2.6)

PROJECT(ReadDICOM)

find_package(VTK REQUIRED)

include(${VTK_USE_FILE})

 

find_package(ITK REQUIRED)

include(${ITK_USE_FILE})

 

add_executable(ReadDICOM ReadDICOM.cxx)

 

target_link_libraries(ReadDICOM ${VTK_LIBRARIES} ${ITK_LIBRARIES})

 

 

Everything goes ok with CMake, the headers and libraries seem to be in
the project properties, but Visual Studio can only find VTK headers,
etc.

 

It can't find the ITK headers, and doesn't compile if I try to use ITK.
Is there something I'm missing? ( I'm a newbie with CMake) 

 

Thanks

 

Rick

 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.itk.org/pipermail/insight-users/attachments/20111007/e6267203/attachment.htm>


More information about the Insight-users mailing list