cmake_minimum_required(VERSION 3.10) project(vtktest C CXX) find_package(VTK COMPONENTS CommonCore CommonDataModel CommonExecutionModel CommonTransforms FiltersCore FiltersExtraction FiltersGeneral FiltersGeometry FiltersModeling FiltersSources IOExportGL2PS IOImage IOXML ImagingColor ImagingCore ImagingGeneral ImagingMath RenderingAnnotation RenderingCore RenderingOpenGL2 # These modules are suggested since they implement an existing module. # Uncomment those you need. InteractionStyle # implements VTK::RenderingCore RenderingFreeType # implements VTK::RenderingCore RenderingGL2PSOpenGL2 # implements VTK::RenderingOpenGL2 RenderingUI # implements VTK::RenderingCore ) add_library(foo dummy.cxx) target_link_libraries(foo vtkCommonCore-9.0 vtkCommonDataModel-9.0 # Eventually will need more here... ) vtk_module_autoinit(TARGETS foo MODULES CommonCore CommonDataModel CommonExecutionModel CommonTransforms FiltersCore FiltersExtraction FiltersGeneral FiltersGeometry FiltersModeling FiltersSources IOExportGL2PS IOImage IOXML ImagingColor ImagingCore ImagingGeneral ImagingMath RenderingAnnotation RenderingCore RenderingOpenGL2 # These modules are suggested since they implement an existing module. # Uncomment those you need. InteractionStyle # implements VTK::RenderingCore RenderingFreeType # implements VTK::RenderingCore RenderingGL2PSOpenGL2 # implements VTK::RenderingOpenGL2 RenderingUI # implements VTK::RenderingCore )