[ITK-users] find_package(ITK) and find_package(VTK) problems in CMake
Matt McCormick
matt.mccormick at kitware.com
Wed Mar 4 23:31:10 EST 2015
Hi Lin,
Please try using VTK 6.2rc1 or newer.
Thanks,
Matt
On Tue, Mar 3, 2015 at 11:23 AM, Lin M <majcjc at gmail.com> wrote:
> 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
>
> _____________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Kitware offers ITK Training Courses, for more information visit:
> http://www.kitware.com/products/protraining.php
>
> Please keep messages on-topic and check the ITK FAQ at:
> http://www.itk.org/Wiki/ITK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/insight-users
>
More information about the Insight-users
mailing list