[vtkusers] How to disable linking with GL2PS VTK module?

Ben Boeckel ben.boeckel at kitware.com
Wed Jan 24 08:36:05 EST 2018


On Wed, Jan 24, 2018 at 08:31:28 +0000, Boris Basic wrote:
> Actually I found a hack by adding "#undef
> vtkRenderingOpenGL2_AUTOINIT" in one header of my project. Though it's
> not very elegant, it did the job.

How are you calling `find_package(VTK)`? If you don't give components,
all compiled modules are loaded and assumed to be used at once, hence
the autoinit.

You can also use `vtk_module_config` to set `VTK_LIBRARIES` up with a
subset of modules (at least based on the examples).

--Ben


More information about the vtkusers mailing list