[Insight-users] VTK_LIBRARIES empty?
Brad King
brad.king at kitware.com
Fri, 09 Apr 2004 11:59:15 -0400
Toon Huysmans wrote:
> Hi All,
>
> It seems that the variable VTK_LIBRARIES is not defined in vtk 4.2,
> because when looking in the project settings, only ITK and FLTK libs are
> linked to, no VTK libs.
> This results in a unresolved external:
>
> THCochleaSegmentationII.obj : error LNK2019: unresolved external
> symbol "__declspec(dllimport) public: static class vtkRenderWindow * __cdecl
> vtkRenderWindow::New (void)"
> (__imp_?New at vtkRenderWindow at at SAPAV1 at XZ) referenced in function _main
>
> But I did include VTK_LIBRARIES in my TARGET_LINK_LIBRARIES statement!
> Is it necessary to use the individual libs instead of the VTK_LIBRARIES
> variable?
>
> Though, the include directories for vtk are set correctly.
I do not think there is any such variable as VTK_LIBRARIES. Where did
you see an example or documentation of its use? A variable like
VTK_LIBRARIES does not make sense because only a subset of VTK's
libraries may be needed by a project. Variables like FOO_LIBRARIES
exist for outside projects not built by CMake where dependencies among
libraries are not known.
Yes, you should list the individual libraries like vtkIO or vtkRendering
in the linking command. List only the libraries that you use. CMake
will automatically link to the libraries on which the VTK libraries depend.
-Brad