Skip to content

Use FetchContent to build ITK#467

Open
blowekamp wants to merge 4 commits into
InsightSoftwareConsortium:mainfrom
blowekamp:use_itk_fetchcontent
Open

Use FetchContent to build ITK#467
blowekamp wants to merge 4 commits into
InsightSoftwareConsortium:mainfrom
blowekamp:use_itk_fetchcontent

Conversation

@blowekamp

Copy link
Copy Markdown
Member

Remove the External ITK Superbuild, and replace with a tightly coupled ITKFetchContent.

@github-actions github-actions Bot added area:Filtering Issues affecting the Filtering module type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots labels Jun 15, 2026
@blowekamp blowekamp requested review from dzenanz, hjmjohnson and thewtex and removed request for hjmjohnson June 15, 2026 15:55

@dzenanz dzenanz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good on a glance.

Comment thread CMake/ITKFetchContent.cmake
@blowekamp blowekamp force-pushed the use_itk_fetchcontent branch from cd98c4e to c4df1a5 Compare June 15, 2026 17:35
Comment thread CMake/ITKFetchContent.cmake Outdated
@blowekamp blowekamp force-pushed the use_itk_fetchcontent branch from c4df1a5 to 5106aab Compare June 15, 2026 18:38
Comment thread CMake/ITKFetchContent.cmake Outdated

@hjmjohnson hjmjohnson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a few minor fixes.

- Replace direct find_package(ITK) with CMake/ITKFetchContent.cmake
- FetchContent intelligently finds pre-built ITK via ITK_DIR or downloads
- Fix itk_module_impl condition: use itk-module variable instead of COMMAND
  to properly distinguish between superbuild/module context vs standalone
- Delete Superbuild/External-ITK.cmake
- Remove ITK dependencies from Superbuild/Superbuild.cmake
- ITK now provided exclusively via FetchContent in root CMakeLists
- Superbuild still handles optional VTK, OpenCV, and Python wrapping
@blowekamp blowekamp force-pushed the use_itk_fetchcontent branch from 5106aab to 2bfa927 Compare June 15, 2026 20:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:Filtering Issues affecting the Filtering module type:Infrastructure Infrastructure/ecosystem related changes, such as CMake or buildbots

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants