From c59cf89bedde15e8431e5733473ec077bcda43c0 Mon Sep 17 00:00:00 2001 From: "Hans J. Johnson" Date: Fri, 11 Sep 2026 15:40:04 -0500 Subject: [PATCH] COMP: Require ITK 6 Every example links ITK::...Module interface targets, which ITK 5.x does not export, so against ITK 5.4 configure fails with one missing-target error per example (346 in all). Requiring ITK 6 stops at the first find_package with a single version error instead. Examples for ITK 5.x now live on the release-5.4 branch. --- src/CMakeLists.txt | 2 +- src/Core/Common/FilterAndParallelizeImageRegion/CMakeLists.txt | 2 +- src/Core/Common/UseParallelizeImageRegion/CMakeLists.txt | 2 +- .../ImageGradient/ApplyGradientRecursiveGaussian/CMakeLists.txt | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 45a8f2e0f..951f92a70 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -4,7 +4,7 @@ if(itk-module) return() endif() endif() -find_package(ITK 5.2.0 REQUIRED) +find_package(ITK 6 REQUIRED) # To avoid linker issues. # Module_ITKVtkGlue is true when building inside ITK diff --git a/src/Core/Common/FilterAndParallelizeImageRegion/CMakeLists.txt b/src/Core/Common/FilterAndParallelizeImageRegion/CMakeLists.txt index 9eb6f8b0d..2d32a6e82 100644 --- a/src/Core/Common/FilterAndParallelizeImageRegion/CMakeLists.txt +++ b/src/Core/Common/FilterAndParallelizeImageRegion/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.22.1) project(FilterAndParallelizeImageRegion) -find_package(ITK 5.0 REQUIRED) +find_package(ITK 6 REQUIRED) add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Core/Common/UseParallelizeImageRegion/CMakeLists.txt b/src/Core/Common/UseParallelizeImageRegion/CMakeLists.txt index 41aef7259..aed8c5751 100644 --- a/src/Core/Common/UseParallelizeImageRegion/CMakeLists.txt +++ b/src/Core/Common/UseParallelizeImageRegion/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.22.1) project(UseParallelizeImageRegion) -find_package(ITK 5.0 REQUIRED) +find_package(ITK 6 REQUIRED) add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries( diff --git a/src/Filtering/ImageGradient/ApplyGradientRecursiveGaussian/CMakeLists.txt b/src/Filtering/ImageGradient/ApplyGradientRecursiveGaussian/CMakeLists.txt index b4388916c..8b025ef53 100644 --- a/src/Filtering/ImageGradient/ApplyGradientRecursiveGaussian/CMakeLists.txt +++ b/src/Filtering/ImageGradient/ApplyGradientRecursiveGaussian/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.22.1) project(ApplyGradientRecursiveGaussian) -find_package(ITK 4.7.0 REQUIRED) +find_package(ITK 6 REQUIRED) add_executable(${PROJECT_NAME} Code.cxx) target_link_libraries(