Skip to content

Commit 1f64368

Browse files
committed
build: Remove ITK from Superbuild, keep VTK/OpenCV/Python
- 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
1 parent c806375 commit 1f64368

2 files changed

Lines changed: 4 additions & 82 deletions

File tree

Superbuild/External-ITK.cmake

Lines changed: 0 additions & 74 deletions
This file was deleted.

Superbuild/Superbuild.cmake

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,13 @@ else()
2929
endif()
3030

3131
set(ITKSphinxExamples_DEPENDENCIES )
32-
set(ITK_DEPENDENCIES )
3332

3433
option(ITKSphinxExamples_USE_VTK "Add VTK to the superbuild." OFF)
3534

3635
option(ITKSphinxExamples_USE_OpenCV "Add OpenCV to the superbuild" OFF)
3736
if(NOT OpenCV_DIR AND ITKSphinxExamples_USE_OpenCV)
3837
include(${CMAKE_SOURCE_DIR}/External-OpenCV.cmake)
3938
list(APPEND ITKSphinxExamples_DEPENDENCIES OpenCV)
40-
list(APPEND ITK_DEPENDENCIES OpenCV)
4139
endif()
4240

4341

@@ -55,13 +53,11 @@ endif()
5553
if(NOT VTK_DIR AND ITKSphinxExamples_USE_VTK)
5654
include(${CMAKE_SOURCE_DIR}/External-VTK.cmake)
5755
list(APPEND ITKSphinxExamples_DEPENDENCIES VTK)
58-
list(APPEND ITK_DEPENDENCIES VTK)
5956
endif()
6057

61-
if(NOT ITK_DIR)
62-
include(${CMAKE_SOURCE_DIR}/External-ITK.cmake)
63-
list(APPEND ITKSphinxExamples_DEPENDENCIES ITK)
64-
endif()
58+
# ITK is no longer fetched by the Superbuild. It is acquired via FetchContent
59+
# in the root CMakeLists.txt. Pass ITK_DIR through if provided by the user
60+
# so the inner build can use a pre-built ITK via find_package.
6561

6662
option(BUILD_DOCUMENTATION "Build documentation" OFF)
6763
set(_build_doc_args)
@@ -108,7 +104,7 @@ ExternalProject_Add(ITKSphinxExamples
108104
${_build_doc_args}
109105
${_python_args}
110106
-DBUILD_SHARED_LIBS:BOOL=FALSE
111-
# ITK
107+
# ITK — pass through ITK_DIR if provided, otherwise FetchContent handles it
112108
-DITK_DIR:PATH=${ITK_DIR}
113109
-DBUILD_TESTING:BOOL=${BUILD_TESTING}
114110
-DBUILD_DOCUMENTATION:BOOL=${BUILD_DOCUMENTATION}

0 commit comments

Comments
 (0)