Skip to content
  • Jean-Christophe Fillion-Robin's avatar
    ExternalModule: Improve target export to allow build against external module · 20629593
    Jean-Christophe Fillion-Robin authored
    This commit backports the ITK external module infrastructure to allow
    building against a collection of VTK module externally built.
    
    In a nutshell, config files [1] associated with external modules are now configured into the VTK module
    directory found in the VTK binary directory and they have to be
    explicitly listed as components when using `find_package(VTK COMPONENTS NameOfExternalModule REQUIRED)`.
    
    More specifically, it implements the following changes:
    
    * List of enabled VTK module is now configured into `VTKConfig.cmake` instead
      of being set based on the list of `*.cmake` found in the VTK module
      directory. This allows to only consider VTK modules enabled in the original VTK
      build directory when using signature `find_package(VTK REQUIRED)` in user code or VTK remote
      module.
    
    * Each external module is now associated with its own target file
      independent of `VTKTargets.cmake`
    
    [1] module config files:
    ```
    lib/cmake/v...
    20629593