[vtkusers] find_package( ITK ) overrides ${VTK_LIBRARIES} from find_package( VTK )

David Gobbi david.gobbi at gmail.com
Tue Dec 2 00:39:17 EST 2014

Hi Pablo,

It's best to only link to the VTK libraries that you need, rather than
trying to
link to them all via ${VTK_LIBRARIES}.

The reason for the short list is probably that when ITK calls
it only requests the small set of VTK components that ITK uses:

 - David

On Mon, Dec 1, 2014 at 10:26 PM, Pablo Hernández <
pablo.hernandez.cerdan at outlook.com> wrote:

> I  have a running/compiling CMakeLists.txt when using VTK only, this is
> the related VTK part:
> find_package(VTK 6.2 REQUIRED)
>  message (status "** VTK FOUND: USE_FILES ${VTK_USE_FILE}")
> message (status "** VTK FOUND: VTK_LIBRARIES ${VTK_LIBRARIES}")
> include(${VTK_USE_FILE})
> include_directories( ${VTK_INCLUDE_DIRS})
> include_directories(${CMAKE_CURRENT_SOURCE_DIR})
> add_executable(VTKNodesEdgesEXE main.cpp ${source_files} ${QT_UI_HEADERS}
> target_link_libraries(VTKNodesEdgesEXE ${VTK_LIBRARIES})
> target_link_libraries(VTKNodesEdgesEXE Qt5::Widgets Qt5::PrintSupport)
> The problem is that if I add find_package(ITK) anywhere, ${VTK_LIBRARIES}
> gets overrides by a tiny list selected by ITK.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141201/e6a1a424/attachment.html>

More information about the vtkusers mailing list