As a part of the support for CMake it would be nice if a FindGEANT4.cmake script was added to the sources for other projects to use when linking to Geant4. I found one here while searching the web: http://aliceinfo.cern.ch/static/aliroot-pro/cmake/modules/ This seems to be a nice start but it needs expanding.
We'll look at adding this - I do have a FindGeant4.cmake module that improves on the example posted, but like that one it also needs work ;-). See also Bug #1200 - this is not strictly a duplicate (and I won't mark it as so), but is connected because the preferred solution for application builders using CMake will be to provide Geant4{Config,ConfigVersion}.cmake files. However, the module based find will be useful for CMake users wishing to find older versions, so we'll look into it. Cheers, Ben.
Aha, I was not aware of the concept of FooBarConfig.cmake files, perhaps that is a better/sufficient solution. I am no CMake expert so it seems you know more than me in this field. And yes, I also did some preliminary modifications to the script posted (adding search paths), but it is not sufficient I believe.
Marking this as a WONTFIX because as of the 9.5 beta, we supply a Geant4Config.cmake module, plus support modules, which can be used by the 'config mode' of CMake's find_package command. A project using Geant4 simply has to write find_package(Geant4 <ARGS>) in their CMakeLists.txt, and when running CMake point it to 'Geant4_DIR', the location of the Geant4Config.cmake module, e.g. cmake -DGeant4_DIR=/usr/lib/Geant4-9.5.0 <path-to-source>