[vtk-developers] Repeated calls to find_package(VTK COMPONENTS ...)

Brad King brad.king at kitware.com
Thu Sep 25 12:56:26 EDT 2014


On 09/25/2014 12:48 PM, Matt McCormick wrote:
> Looking at FindITK.cmake and FindVTK.cmake, they appear to not
> propagate COMPONENTS [1] [2].

Those are forwarded by find_package automatically:

 http://www.cmake.org/cmake/help/v3.0/command/find_package.html
 "If no [version] and/or component list is given to a recursive
  invocation inside a find-module, the corresponding arguments
  are forwarded automatically from the outer call"

> I think we should consider removing these altogether.
> Any version of ITK or VTK from moderately recent history will
> have a Config.cmake file.

They provide compatibility for applications that expect
USE_ITK_FILE or USE_VTK_FILE to be set instead of the modern
ITK_USE_FILE or VTK_USE_FILE.  The ITK one also provides
compatibility with versions of ITK that installed the
package files under lib/InsightToolkit instead of lib/ITK.

However, I would be okay with removing them.

-Brad



More information about the vtk-developers mailing list