I am developing an extension and am in the very early phases. I see in the 3d slicer documentation that there is a superbuild extension template, does that whole template replace the CmakeLists file the extension creation template gives you?
Hi @Canada101,
The SuperBuild template is meant for extensions that have external C++ dependencies they need to build prior to C++ CLI or Loadable extensions.
In the CMakeLists.txt, a few variables will indicate that you are working in a SuperBuild:
set(EXTENSION_BUILD_SUBDIRECTORY inner-build)
set(SUPERBUILD_TOPLEVEL_PROJECT inner)
mark_as_superbuild(Slicer_DIR)
#-----------------------------------------------------------------------------
# SuperBuild setup
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()
If you are only using Python for your extension or only depend on Slicer’s libraries (VTK / ITK / CTK / Qt …) for your C++ extension, you can leave aside the SuperBuild.
Best,
Thibault