| Summary: | FindGEANT4.cmake in source | ||
|---|---|---|---|
| Product: | Geant4 | Reporter: | Yngve Inntjore Levinsen <yngve.inntjore.levinsen> |
| Component: | cmake | Assignee: | Ben Morgan <Ben.Morgan> |
| Status: | CLOSED WONTFIX | ||
| Severity: | enhancement | CC: | yngve.inntjore.levinsen |
| Priority: | P5 | ||
| Version: | 9.4 | ||
| Hardware: | All | ||
| OS: | All | ||
|
Description
Yngve Inntjore Levinsen
2011-05-15 22:14:05 CEST
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> |