简体   繁体   English

CMake错误构建VTK 6.2.0

[英]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在Windows中重新构建VTK构建时,在生成Visual Studio C ++ 2012项目规范(x86)的过程中,我在CMake中遇到以下错误

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. 奇怪的是,它过去可以很好地构建64位。 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) 我的vtk库和文件分散在几张不同的光盘上,包括“ C:\\ Program Files”,并且我的VTK_DIR环境变量指向VTK源目录(这可能是错误的)

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. 如果有迹象表明,我在同一源代码树中的VTK-6.0目录旁边有一个Freetype“安装”(lib /,include /,dll /)。 Could it be that some old .cmake script is mal-configured and causing problems? 可能是某些旧的.cmake脚本配置错误并引起问题吗? (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. (大约几个月前,我移动了一些源和库)显然,清除缓存或重新启动c-make都是我尝试过的所有事情。 Disabling opengl rendering doesn't seem to resolve the problem. 禁用opengl渲染似乎无法解决问题。

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. 问题的确是我之前对VTK内的3rd party文件夹进行了手动更改的结果,该文件夹包含带有vtkfreetype模块的freetype文件夹。

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. 长话短说,因为我遇到了cmake问题,错误地将此文件夹用作其他项目构建的依赖项(使用find-package),所以我压缩了freetype文件夹并将其从3rd party文件夹中删除。 Restoring them fixed the cmake generation. 恢复它们修复了cmake生成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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