# How to set up Slicer to be built with local dependencies

**URL:** <https://discourse.slicer.org/t/how-to-set-up-slicer-to-be-built-with-local-dependencies/25886>\
**Category:** Development\
**Created:** [October 25, 2022, 6:00am UTC](https://discourse.slicer.org/t/how-to-set-up-slicer-to-be-built-with-local-dependencies/25886 "2022-10-25T06:00:00Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![miniminic](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/miniminic/32/16647_2.png) [@miniminic](https://discourse.slicer.org/u/miniminic)\
**Post date:** [October 25, 2022, 6:00am UTC](https://discourse.slicer.org/t/how-to-set-up-slicer-to-be-built-with-local-dependencies/25886/1 "2022-10-25T06:00:00Z")

</div>

When building, Slicer needs to download various dependencies like ctk,itk,vtk from links. If I download these dependencies locally beforehand and I want slicer to compile with local dependencies, how should I set them? thank you

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [October 25, 2022, 12:27pm UTC](https://discourse.slicer.org/t/how-to-set-up-slicer-to-be-built-with-local-dependencies/25886/2 "2022-10-25T12:27:40Z")

</div>

It would be possible for you to search through the build system and set things up to point to local downloads of dependencies, but this would not be stable since they change fairly often and everything is set up to download on the fly. It could help if you describe what problem you are trying to solve.

---

<div class="post-metadata">

**Author:** ![miniminic](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/miniminic/32/16647_2.png) [@miniminic](https://discourse.slicer.org/u/miniminic)\
**Post date:** [October 25, 2022, 12:46pm UTC](https://discourse.slicer.org/t/how-to-set-up-slicer-to-be-built-with-local-dependencies/25886/3 "2022-10-25T12:46:18Z")

</div>

Just like a normal vs project, I can package it and copy paste it on another computer without any configuration or downloading anything from the network, just double click to run the .sln file and build. I hope slicer will be able to completely migrate the whole project to another computer like this.

---

<div class="post-metadata">

**Author:** ![jamesobutler](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/jamesobutler/32/7511_2.png) [@jamesobutler](https://discourse.slicer.org/u/jamesobutler)\
**Post date:** [October 25, 2022, 1:14pm UTC](https://discourse.slicer.org/t/how-to-set-up-slicer-to-be-built-with-local-dependencies/25886/4 "2022-10-25T13:14:20Z")

</div>

Are you trying to avoid building Slicer on your 2nd developer computer? Or are you trying to distribute custom code to another person to try out?

---

<div class="post-metadata">

**Author:** ![miniminic](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/miniminic/32/16647_2.png) [@miniminic](https://discourse.slicer.org/u/miniminic)\
**Post date:** [October 25, 2022, 1:18pm UTC](https://discourse.slicer.org/t/how-to-set-up-slicer-to-be-built-with-local-dependencies/25886/5 "2022-10-25T13:18:59Z")

</div>

Yes I might be developing on a computer that is completely disconnected from the Internet. I can’t download slicer dependencies from the Internet. I’m trying to copy slicer to such a computer for development

---

<div class="post-metadata">

**Author:** ![miniminic](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/miniminic/32/16647_2.png) [@miniminic](https://discourse.slicer.org/u/miniminic)\
**Post date:** [October 26, 2022, 2:29am UTC](https://discourse.slicer.org/t/how-to-set-up-slicer-to-be-built-with-local-dependencies/25886/6 "2022-10-26T02:29:45Z")

</div>

Where is this build system and how should I set them up to use local dependencies such as ctk, itk, vtk

---

<div class="post-metadata">

**Author:** ![lassoan](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/lassoan/32/13_2.png) [@lassoan](https://discourse.slicer.org/u/lassoan)\
**Post date:** [October 27, 2022, 5:50am UTC](https://discourse.slicer.org/t/how-to-set-up-slicer-to-be-built-with-local-dependencies/25886/7 "2022-10-27T05:50:07Z")

</div>

You can set local repository URLs when you configure your project in CMake, by using `Slicer_${proj}_GIT_REPOSITORY` variables. You can find the default URLs in `SuperBuild\External_....cmake` files.

---

<div class="post-metadata">

**Author:** ![miniminic](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/miniminic/32/16647_2.png) [@miniminic](https://discourse.slicer.org/u/miniminic)\
**Post date:** [October 27, 2022, 6:18am UTC](https://discourse.slicer.org/t/how-to-set-up-slicer-to-be-built-with-local-dependencies/25886/8 "2022-10-27T06:18:24Z")

</div>

Ok, thank you very much.
