Reputation: 21
Error in Cmake configuration for VTK
I am a beginner building the lib environment for ITK/VTK/QT for medical imaging analysis. The problem comes in when try to install VTK.
I am not sure this error is linked to qt or other dependency? Is it the problem of the OpenGL2 or others?
I would be very appreciated if you could help me through this issue.
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".
Upvotes: 2
Views: 2865
Reputation: 11
Try this!
Open CMakeList.txt and modify as following, Cut and paste lines from 156~157 to 154~155. Final code like this :
# 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)
Good luck~!
Upvotes: 1