Geant4PackageCache.cmake error during building exampleB1

I succesfully built and installed the latest verion of Geant4 on my computer (Windows7, Visual Studio 19) with the Qt and OpenGL visualization driwers. I installed Qt5.12.5 and CMAKE_PREFIX_PATH was se to Qt/5.12.5/msvc_2017_64 folder. But when I tried to built the example B1, i got the following error:

CMake Error at C:/GEANT4/geant4/lib/Geant4-10.6.1/Geant4PackageCache.cmake:25 (g
geant4_set_and_check_package_variable Macro invoked with incorrect
arguments for macro named: geant4_set_and_check_package_variable
Call Stack (most recent call first):
C:/GEANT4/geant4/lib/Geant4-10.6.1/Geant4Config.cmake:240 (include)
CMakeLists.txt:14 (find_package)


and when I opened the Geant4PackageCache.cmake I found this on the mentioned line:

geant4_set_and_check_package_variable(OPENGL_INCLUDE_DIR “” “”)

so it seams that something is missing there but I do not know what because there was no error during building Geant4. Could you please help me? Thank you.

1 Like

It’s been a while since did an install and those installs were on Linux but I suspect (and if memory serves) G4 isn’t finding the OpenGL libraries. Check to see whether you have the OpenGL libraries installed. There’s a subtle difference between OpenGL and the libraries but I can’t remember the details.