VTK的Cmake配置错误
我是为ITK / VTK / QT建立医学成像分析库环境的初学者。尝试安装VTK时会出现问题。
我不确定此错误是否与qt或其他依赖关系有关?是OpenGL2还是其他的问题?
如果您能帮助我解决此问题,我们将不胜感激。
Group Qt modules:
vtkGUISupportQt;vtkGUISupportQtSQL;vtkRenderingQt;vtkViewsQt
Group Rendering modules:
vtkGeovisCore;vtkIOExport;vtkIOExportPDF;vtkInteractionImage;vtkInteractionStyle;vtkInteractionWidgets;vtkRenderingAnnotation;vtkRenderingContext2D;vtkRenderingCore;vtkRenderingFreeType;vtkRenderingImage;vtkRenderingLOD;vtkRenderingLabel;vtkRenderingVolume;vtkViewsContext2D;vtkViewsCore;vtkViewsInfovis Group Tk modules: vtkRenderingTk Group Views modules: vtkViewsContext2D;vtkViewsGeovis Group Web modules: vtkWebCore;vtkWebPython;vtkWebGLExporter Backend OpenGL2 modules: vtkDomainsChemistryOpenGL2;vtkIOExportOpenGL2;vtkImagingOpenGL2;vtkRenderingContextOpenGL2;vtkRenderingGL2PSOpenGL2;vtkRenderingLICOpenGL2;vtkRenderingOpenGL2;vtkRenderingOpenVR;vtkRenderingVolumeOpenGL2
Enabling modules for OpenGL2.
CMake Error at CMakeLists.txt:156 (export):
export EXPORT or TARGETS specifier missing.
Configuring incomplete, errors occurred!
See also "/Users/morse/VTK-8.2.0/build/CMakeFiles/CMakeOutput.log".
See also "/Users/morse/VTK-8.2.0/build/CMakeFiles/CMakeError.log".
答案 0 :(得分:1)
尝试一下!
打开CMakeList.txt并进行如下修改, 将线条从156〜157剪切并粘贴到154〜155。 这样的最终代码:
# Add a virtual target that can be used to build all compile tools.
add_custom_target(vtkCompileTools)
if (_vtk_compiletools_targets)
list(REMOVE_DUPLICATES _vtk_compiletools_targets)
export(TARGETS ${_vtk_compiletools_targets}
FILE ${VTK_BINARY_DIR}/VTKCompileToolsConfig.cmake)
add_dependencies(vtkCompileTools ${_vtk_compiletools_targets})
endif()
unset(_vtk_targets)
unset(_vtk_compiletools_targets)
unset(_vtk_all_targets)
祝你好运〜!