Skip to content

Commit

Permalink
ENH: Require less components to be built for examples
Browse files Browse the repository at this point in the history
While this directly removes ITKTestKernel as a dependency,
it indirectly removes a lot of IO modules which ITKTestKernel requires.
  • Loading branch information
dzenanz committed Jan 25, 2023
1 parent 785a417 commit 76b2286
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,22 @@ cmake_minimum_required(VERSION 3.10.2)
project(ITKMontageExamples)

set(ExampleSpecificComponents
Montage
ITKBiasCorrection
ITKImageGrid
ITKImageFeature
ITKIOMeta
ITKIONRRD
ITKIOPNG
ITKIOTransformInsightLegacy
)

if(NOT ITK_SOURCE_DIR)
find_package(ITK 5.2 REQUIRED COMPONENTS Montage ITKImageIO ITKTransformIO ITKTestKernel ${ExampleSpecificComponents})
find_package(ITK 5.2 REQUIRED COMPONENTS ITKImageIO ITKTransformIO ${ExampleSpecificComponents})
else()
# when being built as part of ITK, ITKImageIO and ITKTransformIO
# lists of modules are not yet ready, causing a configure error
find_package(ITK REQUIRED COMPONENTS Montage ITKIOTransformInsightLegacy ITKIONRRD ITKIOPNG ITKTestKernel ${ExampleSpecificComponents})
find_package(ITK REQUIRED COMPONENTS ${ExampleSpecificComponents})
endif()
include(${ITK_USE_FILE})

Expand Down

0 comments on commit 76b2286

Please sign in to comment.