How to make slicer compile using local ctk, itk, vtk

For example, I modified ctk to implement the control style I wanted, but slicer was first compiled by downloading the latest ctk from the web. How do I get slicer to use the local ctk.

Slicer’s build system is not extensively documented, but all the source code is available for inspection and it uses community standard tools like CMake and git. We suggest following the documented build instructions carefully to avoid complicated debugging, but if you want to do something custom you’ll want to get very comfortable with all the build tools and libraries.

To use a local copy of most of the external project, you could (re-)configure the Slicer top-level project passing options like:

cmake \
  -DSlicer_${proj}_GIT_REPOSITORY:STRING=file:///path/to/local/project-src \
  -DSlicer_${proj}_GIT_TAG:STRING=master \
  ...

where ${proj} is the name of the project.

Inspecting the External_${proj}.cmake file found in the SuperBuild folder may help understand which project support this.

Ok, thank you very much. I’ll go back and try it