Compiling Geant4 with Qt5

Hi,

I’m trying to compile Geant4 (4.10.06.p1) with the Qt5 flag enabled on a Mac (Catalina 10.15.3). With brew, I’ve installed the latest Qt package (5.14.1). It fails as it is looking for a Qt3.xx or Qt4.xx. I cannot revert back to Qt4.xx (it doesn’t work on my OS). Is there any way to still make this work?

Cheers,
Johan

Hi Johan

You have to point to your Qt5 installation. For example

-DGEANT4_USE_QT=ON
-DQT_QMAKE_EXECUTABLE=~/Qt/Qt5.14.1/5.14.1/clang_64/bin/qmake
-DCMAKE_PREFIX_PATH="~/Qt/Qt5.14.1/5.14.1/clang_64 \

See Installation Guide.

John

That was very useful, thank you.
Actually, What I did was:

cmake -DGEANT4_USE_QT=ON -DQT_QMAKE_EXECUTABLE=/Applications/Qt/5.15.1/clang_64/bin/qmake -DCMAKE_PREFIX_PATH="/Applications/Qt/5.15.1/clang_64:/Applications/Qt/5.15.1/clang_64/lib" .
make
make install

Also, following the suggestion in: https://www.scm.com/doc/Installation/Remote_GUI.html,

defaults write org.macosforge.xquartz.X11 enable_iglx -bool true

and restart xquartz.