# Getting a "Qt 5.15 was not found on your system" error

**URL:** <https://discourse.slicer.org/t/getting-a-qt-5-15-was-not-found-on-your-system-error/37377>\
**Category:** Development\
**Created:** [July 15, 2024, 11:34am UTC](https://discourse.slicer.org/t/getting-a-qt-5-15-was-not-found-on-your-system-error/37377 "2024-07-15T11:34:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![tmondo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tmondo/32/77319_2.png) [@tmondo](https://discourse.slicer.org/u/tmondo)\
**Post date:** [July 15, 2024, 11:34am UTC](https://discourse.slicer.org/t/getting-a-qt-5-15-was-not-found-on-your-system-error/37377/1 "2024-07-15T11:34:34Z")

</div>

Hello,

I’ve been trying to setup Slicer for local development, but I’m having trouble with Qt when going through the configuration step.

I’m running MacOS, and on the build instructions page([macOS — 3D Slicer documentation](https://slicer.readthedocs.io/en/latest/developer_guide/build_instructions/macos.html)) there is a link for the Qt installer.

However, in the installer I wasn’t able to find Qt 5.15, even when enabling the archive filter, so I proceeded to install Qt using hombrew.

```auto
brew install qt@5

```

After installation, I tried running the configuration step, like so:

```auto
cmake \
  -DCMAKE_OSX_DEPLOYMENT_TARGET:STRING=11.0 \
  -DCMAKE_BUILD_TYPE:STRING=Debug \
  -DQt5_DIR:PATH=/opt/homebrew/opt/qt@5/5.15.13_1/lib/cmake/Qt5 \
  ~/Slicer

```

But I only run into this error:

```auto
CMake Error at CMake/SlicerBlockFindQtAndCheckVersion.cmake:30 (message):
  error: Qt 5.15 was not found on your system.You probably need to set the
  Qt5_DIR variable.
Call Stack (most recent call first):
  CMake/SlicerBlockFindQtAndCheckVersion.cmake:67 (__SlicerBlockFindQtAndCheckVersion_find_qt)
  CMakeLists.txt:695 (include)

```

---

<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:** [July 17, 2024, 3:47pm UTC](https://discourse.slicer.org/t/getting-a-qt-5-15-was-not-found-on-your-system-error/37377/2 "2024-07-17T15:47:07Z")

</div>

I haven’t built from scratch on a mac in a while and probably the Qt5 version is updated, but usually there’s a specially named file that cmake is looking for (I thought it should be listed in the error message). You can investigate what that file is and make sure the `Qt5_DIR` variable points to it. You may need to read the cmake code to make sure

---

<div class="post-metadata">

**Author:** ![tmondo](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/tmondo/32/77319_2.png) [@tmondo](https://discourse.slicer.org/u/tmondo)\
**Post date:** [July 18, 2024, 8:33am UTC](https://discourse.slicer.org/t/getting-a-qt-5-15-was-not-found-on-your-system-error/37377/3 "2024-07-18T08:33:32Z")

</div>

Thank you for the reply!  
I’ll check the cmake files and see if I can figure it out.
