VTK-9: How to know which VTK COMPONENT contains which VTK class?

VTK-9: How to know which VTK COMPONENT contains which VTK class?

In CMakeLists.txt, we call find_package(VTK) to get VTK libraries: worked for me as is with apt-get install VTK package.

Now I need a specific class vtkOpenGLRenderWindow: I had to build VTK from source (this class is not in the default library installed from apt-get). How to know the name of the associated COMPONENT of this given VTK class? What is the XX I need to pass to find_package(VTK COMPONENT XX) ? Is this documented? If yes where (not found)? Are there best practices?

For the record, seems python3 "$VTK_ROOT/Utilities/Maintenance/FindNeededModules.py" -j $VTK_ROOT/build/modules.json -s vtkHelloworld.cpp gives modules to use according to class you need.

No sure this is the correct way… Any better or more exhaustive answer is welcomed

There was the same question recently see here

1 Like