[vtkusers] find_package(ITK) and find_package(VTK) problems in CMake

Lin M majcjc at gmail.com
Tue Mar 3 11:23:29 EST 2015


Hi guys,

I met a strange problem when I try to use ITK and VTK in my projects. If I
only use find_package( VTK required ) cmake will find all the right .h and
.lib files and add them to the project, but if I use both find_package(ITK)
and find_package(VTK), then some of the .h and .lib of VTK just disappeared
in my VS projects. Does anyone have some suggestions for that? Thank you
very much!

My CMakeLists.txt is written as below:

...
...
# QT FILES
FIND_PACKAGE( Qt5Widgets )
FIND_PACKAGE( Qt5Xml )
FIND_PACKAGE( Qt5Core )

# ITK FILES
FIND_PACKAGE( ITK REQUIRED )
INCLUDE( ${ITK_USE_FILE} )

# VTK FILES
FIND_PACKAGE( VTK REQUIRED )
NCLUDE( ${VTK_USE_FILE} )

...
...
TARGET_LINK_LIBRARIES( ${PROJECT_NAME}
   ${Qt5Widgets_LIBRARIES}
   ${Qt5Xml_LIBRARIES}
   ${Qt5Core_LIBRARIES}
   ${VTK_LIBRARIES}
   ${ITK_LIBRARIES}
   )


Best,
Lin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150303/b9fa81b1/attachment.html>


More information about the vtkusers mailing list