Skip to content

COMP: Support building extension with specific module bundles #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
204 changes: 179 additions & 25 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,33 +17,187 @@ set(EXTENSION_DEPENDS "NA") # Specified as a space separated string, a list or '
find_package(Slicer REQUIRED)
include(${Slicer_USE_FILE})

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_IMPORT_MODULES)
option(SLICERSANDBOX_ENABLE_IMPORT_MODULES "Enable the building of import modules." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_IMPORT_MODULES)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_AUTOSAVE_MODULE)
option(SLICERSANDBOX_ENABLE_AUTOSAVE_MODULE "Enable the building of AutoSave module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_AUTOSAVE_MODULE)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_CHARACTERIZETRANSFORMMATRIX_MODULE)
option(SLICERSANDBOX_ENABLE_CHARACTERIZETRANSFORMMATRIX_MODULE "Enable the building of CharacterizeTransformMatrix module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_CHARACTERIZETRANSFORMMATRIX_MODULE)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_COMBINEMODELS_MODULE)
option(SLICERSANDBOX_ENABLE_COMBINEMODELS_MODULE "Enable the building of CombineModels module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_COMBINEMODELS_MODULE)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_CURVEDPLANARREFORMAT_MODULE)
option(SLICERSANDBOX_ENABLE_CURVEDPLANARREFORMAT_MODULE "Enable the building of CurvedPlanarReformat module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_CURVEDPLANARREFORMAT_MODULE)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_DOCUMENTATIONTOOLS_MODULE)
option(SLICERSANDBOX_ENABLE_DOCUMENTATIONTOOLS_MODULE "Enable the building of DocumentationTools module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_DOCUMENTATIONTOOLS_MODULE)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_LIGHTS_MODULE)
option(SLICERSANDBOX_ENABLE_LIGHTS_MODULE "Enable the building of Lights module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_LIGHTS_MODULE)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_LINEPROFILE_MODULE)
option(SLICERSANDBOX_ENABLE_LINEPROFILE_MODULE "Enable the building of LineProfile module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_LINEPROFILE_MODULE)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_LOADREMOTEFILE_MODULE)
option(SLICERSANDBOX_ENABLE_LOADREMOTEFILE_MODULE "Enable the building of LoadRemoteFile module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_LOADREMOTEFILE_MODULE)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_SCENERECORDER_MODULE)
option(SLICERSANDBOX_ENABLE_SCENERECORDER_MODULE "Enable the building of SceneRecorder module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_SCENERECORDER_MODULE)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_SEGMENTCROSSSECTIONAREA_MODULE)
option(SLICERSANDBOX_ENABLE_SEGMENTCROSSSECTIONAREA_MODULE "Enable the building of SegmentCrossSectionArea module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_SEGMENTCROSSSECTIONAREA_MODULE)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_STITCHVOLUMES_MODULE)
option(SLICERSANDBOX_ENABLE_STITCHVOLUMES_MODULE "Enable the building of StitchVolumes module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_STITCHVOLUMES_MODULE)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_STYLETESTER_MODULE)
option(SLICERSANDBOX_ENABLE_STYLETESTER_MODULE "Enable the building of StyleTester module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_STYLETESTER_MODULE)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_USERSTATISTICS_MODULE)
option(SLICERSANDBOX_ENABLE_USERSTATISTICS_MODULE "Enable the building of UserStatistics module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_USERSTATISTICS_MODULE)
endif()


#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_VOLUMERENDERINGSPECIALEFFECTS_MODULE)
option(SLICERSANDBOX_ENABLE_VOLUMERENDERINGSPECIALEFFECTS_MODULE "Enable the building of VolumeRenderingSpecialEffects module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_VOLUMERENDERINGSPECIALEFFECTS_MODULE)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_REMOVECTTABLE_MODULE)
option(SLICERSANDBOX_ENABLE_REMOVECTTABLE_MODULE "Enable the building of RemoveCtTable module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_REMOVECTTABLE_MODULE)
endif()

#-----------------------------------------------------------------------------
if (NOT DEFINED SLICERSANDBOX_ENABLE_COLORIZEVOLUME_MODULE)
option(SLICERSANDBOX_ENABLE_COLORIZEVOLUME_MODULE "Enable the building of ColorizeVolume module." ON)
mark_as_superbuild(SLICERSANDBOX_ENABLE_COLORIZEVOLUME_MODULE)
endif()

#-----------------------------------------------------------------------------
# Extension modules
add_subdirectory(AutoSave)
add_subdirectory(CharacterizeTransformMatrix)
add_subdirectory(CombineModels)
add_subdirectory(CurvedPlanarReformat)
add_subdirectory(DocumentationTools)
if (Slicer_VERSION VERSION_LESS 5.1)
# Latest Slicer 5.1 and above has ITK-Snap Label Description File importer built in
add_subdirectory(ImportItkSnapLabel)
endif()
add_subdirectory(ImportNumPyArray)
add_subdirectory(ImportOCT)
add_subdirectory(ImportOpenInventor)
add_subdirectory(ImportOsirixROI)
add_subdirectory(ImportSliceOmatic)
add_subdirectory(Lights)
add_subdirectory(LineProfile)
add_subdirectory(LoadRemoteFile)
add_subdirectory(SceneRecorder)
add_subdirectory(SegmentCrossSectionArea)
add_subdirectory(StitchVolumes)
add_subdirectory(StyleTester)
add_subdirectory(UserStatistics)
add_subdirectory(VolumeRenderingSpecialEffects)
add_subdirectory(RemoveCtTable)
add_subdirectory(ColorizeVolume)

if (SLICERSANDBOX_ENABLE_AUTOSAVE_MODULE)
add_subdirectory(AutoSave)
endif()

if (SLICERSANDBOX_ENABLE_CHARACTERIZETRANSFORMMATRIX_MODULE)
add_subdirectory(CharacterizeTransformMatrix)
endif()

if (SLICERSANDBOX_ENABLE_COMBINEMODELS_MODULE)
add_subdirectory(CombineModels)
endif()

if (SLICERSANDBOX_ENABLE_CURVEDPLANARREFORMAT_MODULE)
add_subdirectory(CurvedPlanarReformat)
endif()

if (SLICERSANDBOX_ENABLE_DOCUMENTATIONTOOLS_MODULE)
add_subdirectory(DocumentationTools)
endif()

if (SLICERSANDBOX_ENABLE_IMPORT_MODULES)
if (Slicer_VERSION VERSION_LESS 5.1)
# Latest Slicer 5.1 and above has ITK-Snap Label Description File importer built in
add_subdirectory(ImportItkSnapLabel)
endif()
add_subdirectory(ImportNumPyArray)
add_subdirectory(ImportOCT)
add_subdirectory(ImportOpenInventor)
add_subdirectory(ImportOsirixROI)
add_subdirectory(ImportSliceOmatic)
endif()

if (SLICERSANDBOX_ENABLE_LIGHTS_MODULE)
add_subdirectory(Lights)
endif()

if (SLICERSANDBOX_ENABLE_LINEPROFILE_MODULE)
add_subdirectory(LineProfile)
endif()

if (SLICERSANDBOX_ENABLE_LOADREMOTEFILE_MODULE)
add_subdirectory(LoadRemoteFile)
endif()

if (SLICERSANDBOX_ENABLE_SCENERECORDER_MODULE)
add_subdirectory(SceneRecorder)
endif()

if (SLICERSANDBOX_ENABLE_SEGMENTCROSSSECTIONAREA_MODULE)
add_subdirectory(SegmentCrossSectionArea)
endif()

if (SLICERSANDBOX_ENABLE_STITCHVOLUMES_MODULE)
add_subdirectory(StitchVolumes)
endif()

if (SLICERSANDBOX_ENABLE_STYLETESTER_MODULE)
add_subdirectory(StyleTester)
endif()

if (SLICERSANDBOX_ENABLE_USERSTATISTICS_MODULE)
add_subdirectory(UserStatistics)
endif()

if (SLICERSANDBOX_ENABLE_VOLUMERENDERINGSPECIALEFFECTS_MODULE)
add_subdirectory(VolumeRenderingSpecialEffects)
endif()

if (SLICERSANDBOX_ENABLE_REMOVECTTABLE_MODULE)
add_subdirectory(RemoveCtTable)
endif()

if (SLICERSANDBOX_ENABLE_COLORIZEVOLUME_MODULE)
add_subdirectory(ColorizeVolume)
endif()

#-----------------------------------------------------------------------------
include(${Slicer_EXTENSION_GENERATE_CONFIG})
Expand Down