Please fill out the following information to help in answering your question, and also see tips for posting code snippets. If you don’t provide this information it will take more time to help with your problem!
Geant4 Version:
geant4/10.7.1 Operating System:
MAC OS Sonoma 14.4 Compiler/Version:
MacOSX14.4.sdk CMake Version:
cmake version 3.21.4
When I try cd cd ./examples/extended/persistency/gdml/G01
and then cmake .
It is trying to pick a MacOSX11.1 version of the sdk.
I have tried deleting CMakeCache.txt but the cache still gets set 11.1
How do I get cmake to pick up the right version.
CMake Error in CMakeLists.txt:
Imported target “Geant4::G4OpenGL” includes non-existent path
Could you check if the Geant4 install has a Geant4Package.cmake file next to its Geant4Config.cmake file? If it is present, is that path to OpenGL.framework there, or is it in the Geant4LibraryTargets(-mode).cmake file(s) in the same directory as Geant4Config.cmake?
If the Geant4PackageCache.cmake file is present and has that path, you can remove it and see if that fixes things. I’d guess that this is an old install of Geant4 done before a recent upgrade? If that’s the case, you might need to reinstall Geant4, but removing the hard-coded paths in that cache file might resolve things as a first step.
alongside the Geant4LibraryDepends... files (sorry, I use the wrong name in my first post!).
To confirm though, is this a completely fresh install of Geant4, or was it built on the machine prior to any upgrade? If a fresh install, what CMake options did you use?
I probably should have explained as having failed to install with the prepackaged options on MacOS, it was suggested that I try from source using the Unix instructions as per geant4-v11.2.2-install.
I am changing /path/to to /Users/keithsloan.
Yes there is a previous install in a different directory, so as your question about clean install suggests, the options for “/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX11.1.sdk/System/Library/Frameworks/OpenGL.framework”