[vtkusers] VTK 6.1 Cmake find_package doesn't resolve correct .lib names

Legor gordon.boeer at fh-kiel.de
Wed Mar 12 05:44:25 EDT 2014


I followed the Build System Migration Guide and use the following Cmake
commands to use VTK in my project.

/find_package(VTK 6.1 REQUIRED COMPONENTS vtkIOGeometry vtkIOLegacy
vtkFiltersCore NO_MODULE)
if(VTK_FOUND)
	message(STATUS "Found package VTK. Using " ${VTK_USE_FILE})
    include(${VTK_USE_FILE})
else(VTK_FOUND)
    message(FATAL_ERROR "VTK not found. Please set VTK_DIR.")
endif(VTK_FOUND)

target_link_libraries(ght ${VTK_LIBRARIES})/

Also no errors are detected the resulting libs have the wrong names and
therefore can not be found by the linker. The VTK version number in the lib
names is ommited. They are also not provided with the full path (which is
logical since files of that name doesn't even exist on my harddrive). I
wonder why find_package doesn't fail in this case.

For example i will get vtkIOGeometry.lib *instead of* vtkIOGeometry-6.1.lib.

After 2 hours without any progress i feel the need to ask if anyone may have
an idea what may be the problem here.

Thanks a lot,
Gordon.




--
View this message in context: http://vtk.1045678.n5.nabble.com/VTK-6-1-Cmake-find-package-doesn-t-resolve-correct-lib-names-tp5726270.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list