简体   繁体   中英

CMake error building VTK 6.2.0

While trying to re-building a VTK build in Windows using cmake, I came across the following error in CMake during the generation of a Visual Studio C++ 2012 project specification (x86)

CMake Error at CMake/vtkModuleTop.cmake:53 (message):
  No such module "vtkfreetype" needed by "vtkRenderingFreeType"
Call Stack (most recent call first):
  CMake/vtkModuleTop.cmake:69 (vtk_module_check)
  CMake/vtkModuleTop.cmake:69 (vtk_module_check)
  CMake/vtkModuleTop.cmake:69 (vtk_module_check)
  CMake/vtkModuleTop.cmake:76 (vtk_module_check)
  CMakeLists.txt:514 (include)

The strange thing is that it used to build fine for 64 bit. So I tried to rebuild that version, but that now also fails too. I have vtk libs and files scattered around on several different discs, including 'C:\\Program Files", and my VTK_DIR environment variable is pointing into the VTK source directory (which is probably wrong)

Does anyone know what can be the cause of this? If it is any indication, I have a Freetype "install" (lib/, include/, dll/) next to the VTK-6.0 dir sitting in the same source tree. Could it be that some old .cmake script is mal-configured and causing problems? (I moved some of the sources and libs around a few months ago) Obviously clearing the cache or restarting c-make are all things I tried. Disabling opengl rendering doesn't seem to resolve the problem.

The problem was indeed the result of a manual change I made earlier to the 3rd party folder inside VTK, which holds a freetype folder with a vtkfreetype module.

Long story short, because I had cmake-problems that incorrectly used this folder as a dependency for other project builds (using find-package), I had compressed the freetype folder and removed them from the 3rd party folder. Restoring them fixed the cmake generation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM