How can I solve the error, Cannot build Rendering examples without VTK_SOURCE_DIR

I tried to build the example “Rendering” in VTK8.2.0, and then I get the error:

In the CMakeLists, what I have seen is

It seems that that example is currently untested. It will need porting to VTK 9 before it is useful as-is.

VTKExamples which probably has examples which are working better. See this post.

Thank you so much, I’ll try your method

The examples in the VTK source files are unmaintained. The majority of the examples have been moved to vtk-examples.

For example, the examples you refer to (and many more) are found in the rendering section.

They should be removed imo.


I have added this script SelectExamples. You just specify a VTK Class and Language and it will give you a set of links to the relevant VTK examples. It uses a JSON file: vtk_vtk-examples_xref.json that is generated automatically when the VTK Examples are updated. It contains all the VTK examples grouped by VTK Class and Language, @sankhesh, when he has time, is also looking in to using this to provide links to the VTK examples from the VTK Documentation.

Thank you so much!