[vtk-developers] FindPackage not working in new module system

Ben Boeckel ben.boeckel at kitware.com
Thu Jan 10 14:44:33 EST 2019


On Thu, Jan 10, 2019 at 11:00:33 -0800, Bill Lorensen wrote:
> I'm curious why the component names were changed.

Short answer:

CMake intricacies and simpler code on the module system's side.

That said, the translation code is possible to do (though I don't think
I'll get to it right away; feel free to make an MR and I can review).

Long answer:

The idea was to have the name used to link in the build and install tree
be exactly the same. When exporting with a namespace, CMake does
`<namespace>::<target>` without support for renaming `<target>`. The
module system helps to write out the `find_package(dependency)` calls
based on the requested components for which it needs to know their
names. The old component names could have been preserved, but that would
have resulted in targets like `VTK::vtkCommonCore` which I originally
kept, but discussions with others said that `VTK::CommonCore` was
preferred.

--Ben


More information about the vtk-developers mailing list