Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ mark_as_superbuild(PYTHON_LIBRARY)
option(${EXTENSION_NAME}_SUPERBUILD "Build ${EXTENSION_NAME} and the projects it depends on." ON)
mark_as_advanced(${EXTENSION_NAME}_SUPERBUILD)
if(${EXTENSION_NAME}_SUPERBUILD)
include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuildPrerequisites.cmake")
include("${CMAKE_CURRENT_SOURCE_DIR}/SuperBuild.cmake")
return()
endif()
Expand Down
1 change: 0 additions & 1 deletion SuperBuild/External_ITKBSplineGradient.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set(proj ITKBSplineGradient)

# Dependencies
set(${proj}_DEPENDENCIES
ITK
ITKMeshToPolyData
)
ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES)
Expand Down
1 change: 0 additions & 1 deletion SuperBuild/External_ITKHigherOrderAccurateGradient.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set(proj ITKHigherOrderAccurateGradient)

# Dependencies
set(${proj}_DEPENDENCIES
ITK
)
ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES)

Expand Down
1 change: 0 additions & 1 deletion SuperBuild/External_ITKMeshToPolyData.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set(proj ITKMeshToPolyData)

# Dependencies
set(${proj}_DEPENDENCIES
ITK
)
ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES)

Expand Down
1 change: 0 additions & 1 deletion SuperBuild/External_ITKSplitComponents.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set(proj ITKSplitComponents)

# Dependencies
set(${proj}_DEPENDENCIES
ITK
)
ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES)

Expand Down
1 change: 0 additions & 1 deletion SuperBuild/External_ITKStrain.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ set(proj ITKStrain)

# Dependencies
set(${proj}_DEPENDENCIES
ITK
)
ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES)

Expand Down
2 changes: 0 additions & 2 deletions SuperBuild/External_ITKUltrasound.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,10 @@ set(proj ITKUltrasound)

# Dependencies
set(${proj}_DEPENDENCIES
ITK
ITKBSplineGradient
ITKHigherOrderAccurateGradient
ITKSplitComponents
ITKStrain
VTK
)
ExternalProject_Include_Dependencies(${proj} PROJECT_VAR proj DEPENDS_VAR ${proj}_DEPENDENCIES)

Expand Down
40 changes: 40 additions & 0 deletions SuperBuildPrerequisites.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
if(DEFINED slicersources_SOURCE_DIR AND NOT DEFINED Slicer_SOURCE_DIR)
# Explicitly setting "Slicer_SOURCE_DIR" when only "slicersources_SOURCE_DIR"
# is defined is required to successfully complete configuration in an empty
# build directory
#
# Indeed, in that case, Slicer sources have been downloaded by they have not been
# added using "add_subdirectory()" and the variable "Slicer_SOURCE_DIR" is not yet in
# in the CACHE.
set(Slicer_SOURCE_DIR ${slicersources_SOURCE_DIR})
endif()

if(NOT DEFINED Slicer_SOURCE_DIR)
# Extension is built standalone

# NA

else()
# Extension is bundled in a custom application

# Additional external project dependencies
foreach(itk_module IN ITEMS
ITKBSplineGradient
ITKHigherOrderAccurateGradient
ITKMeshToPolyData
ITKSplitComponents
ITKStrain
ITKUltrasound
)
ExternalProject_Add_Dependencies(${itk_module}
DEPENDS
ITK
)
endforeach()

ExternalProject_Add_Dependencies(ITKUltrasound
DEPENDS
VTK
)

endif()