# VTK libraries not found

**URL:** https://discourse.cmake.org/t/vtk-libraries-not-found/10987
**Category:** Usage
**Created:** [June 8, 2024, 10:27pm UTC](https://discourse.cmake.org/t/vtk-libraries-not-found/10987 "2024-06-08T22:27:04Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![gibbogle](https://discourse.cmake.org/user_avatar/discourse.cmake.org/gibbogle/32/4648_2.png) [@gibbogle](https://discourse.cmake.org/u/gibbogle)
#### Post date: [June 8, 2024, 10:27pm UTC](https://discourse.cmake.org/t/vtk-libraries-not-found/10987/1 "2024-06-08T22:27:04Z")

</div>

I am building a program with VS 2010. This uses ITK-4.8, and VTK-5.10.  
The error messages tell me that the VTK package is not found:

F:\vessel-tools\cut\>cmake CMakelists.txt -G “Visual Studio 10 Win64”  
CMake Error at C:/ITK4.8.0/lib/cmake/ITK-4.8/Modules/ITKVtkGlue.cmake:9 (find\_package):  
Could not find a package configuration file provided by “VTK” with any of  
the following names:

```
VTKConfig.cmake
vtk-config.cmake

```

Add the installation prefix of “VTK” to CMAKE\_PREFIX\_PATH or set “VTK\_DIR”  
to a directory containing one of the above files. If “VTK” provides a  
separate development package or SDK, be sure it has been installed.  
Call Stack (most recent call first):  
C:/ITK4.8.0/lib/cmake/ITK-4.8/ITKModuleAPI.cmake:49 (include)  
C:/ITK4.8.0/lib/cmake/ITK-4.8/ITKModuleAPI.cmake:26 (itk\_module\_load)  
C:/ITK4.8.0/lib/cmake/ITK-4.8/ITKModuleAPI.cmake:70 (\_itk\_module\_config\_recurse)  
C:/ITK4.8.0/lib/cmake/ITK-4.8/ITKConfig.cmake:69 (itk\_module\_config)  
CMakeLists.txt:30 (FIND\_PACKAGE)

– Configuring incomplete, errors occurred!

The VTK installation is at E:\VTK\_VS10. Since VTKConfig.cmake is in VTK\_VS10\lib\vtk-5.10, I added a line to CMakelists.txt to set VTK\_DIR to this directory. Here is the main part of the file:

PROJECT(cut)  
set (VTK\_DIR E:/VTK\_VS10/lib/vtk-5.10)  
FIND\_PACKAGE(ITK)  
IF(ITK\_FOUND)  
INCLUDE(${ITK\_USE\_FILE})  
ELSE(ITK\_FOUND)  
MESSAGE(FATAL\_ERROR  
“ITK not found. Please set ITK\_DIR.”)  
ENDIF(ITK\_FOUND)

set(PROJECTNAME “cut”)  
ADD\_EXECUTABLE(${PROJECTNAME} cut.cpp …/gcc/splitpath.cpp )  
TARGET\_LINK\_LIBRARIES(${PROJECTNAME} ${ITK\_LIBRARIES} )  
ADD\_CUSTOM\_COMMAND(TARGET ${PROJECTNAME} POST\_BUILD COMMAND copy "$(TargetPath)" "…/bin/exec")

But the cmake error message is unchanged - VTK is still not found.

---

<div class="post-metadata">

### Author: ![AP76](https://discourse.cmake.org/letter_avatar_proxy/v4/letter/a/96bed5/32.png) [@AP76](https://discourse.cmake.org/u/AP76)
#### Post date: [March 19, 2025, 11:31am UTC](https://discourse.cmake.org/t/vtk-libraries-not-found/10987/2 "2025-03-19T11:31:35Z")

</div>

Dear Gib Bogle,

I ran into the same issue. Please share if you were able to find any solution.

Regards,
