Qt5config.cmake error when downloading to apple silicon device

Please fill out the following information to help in answering your question, and also see tips for posting code snippets

Geant4 Version: 11.1.1
Operating System: Vertuna 13
Compiler/Version: not sure what to write here. (gcc?) will look to its version if necessary

I followed the download manual in Installation on macOS (M-series)

However at step 11 when trying to open QT it says qt5config.cmake is not found. It may require update or not available. Something like this prompts. I use apple silicon macbook. I previously used Ubuntu in my other PC, geant was working perfect there but ubuntu had many software and hardware related issues. So I tried to switch to macOS.

I also read the suggestions in this forum, however; they didn’t work for me. Any other suggestion how to pass the compilation part without QT= OFF.


The instruction here:

7) Define the PKG_CONFIG_PATH environment variable for Qt 5 by typing in the terminal:

export PKG_CONFIG_PATH=/opt/homebrew/Cellar/qt@5/5.15.2_1/lib/pkgconfig/
export PATH=/opt/homebrew/Cellar/qt@5/5.15.2_1/bin:$PATH

is dependent on whether you have that exact version of the qt@5 formula installed (and brew currently ships 5.15.8). It’s cleaner to do:

export PKG_CONFIG_PATH=/opt/homebrew/opt/qt@5/lib/pkgconfig/
export PATH=/opt/homebrew/opt/qt@5/bin:$PATH

which doesn’t depend on the version. Alternatively, use the CMAKE_PREFIX_PATH variable

export CMAKE_PREFIX_PATH="/opt/homebrew/opt/qt@5:$CMAKE_PREFIX_PATH"

as outlined in the Installation Guide.

1 Like

Thank you Benjamin, I will try what you said and will let this forum know as solution.

Have a nice day.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.