[vtk-developers] CMake and VTK_LIBRARY_DIRS

Brad King brad.king at kitware.com
Fri Dec 6 09:50:22 EST 2013


On 12/05/2013 06:14 PM, lgpasquale wrote:
> FIND_PACKAGE(VTK REQUIRED)
> INCLUDE(${VTK_USE_FILE})
> 
> This defines VTK_INCLUDE_DIRS and VTK_LIBRARIES, but not VTK_LIBRARY_DIRS.

No VTK_LIBRARY_DIRS are needed because the above code imports VTK targets.
Following the above code with

 target_link_libraries(myexe ${VTK_LIBRARIES})

causes the linker line to contain the full path to each library file.
The linker does not need any library search paths.

-Brad



More information about the vtk-developers mailing list