# Qt Path - Configuration for Building Slicer

**URL:** <https://discourse.slicer.org/t/qt-path-configuration-for-building-slicer/9171>\
**Category:** Support\
**Tags:** build\
**Created:** [November 15, 2019, 7:35pm UTC](https://discourse.slicer.org/t/qt-path-configuration-for-building-slicer/9171 "2019-11-15T19:35:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marie](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@marie](https://discourse.slicer.org/u/marie)\
**Post date:** [November 15, 2019, 7:35pm UTC](https://discourse.slicer.org/t/qt-path-configuration-for-building-slicer/9171/1 "2019-11-15T19:35:28Z")

</div>

Hi there!

I would like to build Slicer on Ubuntu 19.10. I installed Qt5 via:  
$ sudo apt install qt5-default

Now I am struggling with the following command (see Documentation):  
cmake -DCMAKE\_BUILD\_TYPE:STRING=Debug -DQt5\_DIR:PATH=/path/to/Qt5.11.0/5.11.0/gcc\_64/lib/cmake/Qt5 …/Slicer

Documentation:  
[https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build\_Instructions#Common\_Prerequisites](https://www.slicer.org/wiki/Documentation/Nightly/Developers/Build_Instructions#Common_Prerequisites)

How should I replace _/path/to/QtSDK_ ?? I just can’t find such a path.

Thanks for helping!

- marie

---

<div class="post-metadata">

**Author:** ![marie](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@marie](https://discourse.slicer.org/u/marie)\
**Post date:** [November 15, 2019, 8:15pm UTC](https://discourse.slicer.org/t/qt-path-configuration-for-building-slicer/9171/2 "2019-11-15T20:15:43Z")

</div>

I just solved it myself. Thank you anyway!

---

<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:** [November 15, 2019, 8:32pm UTC](https://discourse.slicer.org/t/qt-path-configuration-for-building-slicer/9171/3 "2019-11-15T20:32:40Z")

</div>

It seems that the build instructions were not clear enough. Could you tell us how to change them to make them easier to follow?

---

<div class="post-metadata">

**Author:** ![marie](https://avatars.discourse-cdn.com/v4/letter/m/bc8723/32.png) [@marie](https://discourse.slicer.org/u/marie)\
**Post date:** [November 15, 2019, 9:46pm UTC](https://discourse.slicer.org/t/qt-path-configuration-for-building-slicer/9171/4 "2019-11-15T21:46:59Z")

</div>

Of course. In the documentation it says:

> Qt 5.11: **tested and recommended**
> 
> - To build Slicer: install Qt using the distribution package manager.
> - To package and redistribute Slicer: download and execute [qt-unified-linux-x64-online.run](https://download.qt.io/official_releases/online_installers/qt-unified-linux-x64-online.run), install Qt, make sure to select qtscript and qtwebengine components.

I thought only the first option was suitable for building 3DSlicer. It turned out, that the second solution works fine! After execution and installing version **5.11.0** (not 5.12), everything worked as expected. Versions older than 5.12 are available on the left (see archive tab in the installation window). I didn’t choose all components but qtscript and qtwebengine as recommended. Some options can occupy much space!

I don’t know whether it works with apt installation though.
