]> git.uio.no Git - u/mrichter/AliRoot.git/blame - cmake/modules/FindGEANT4.cmake
fixed some issues with DATE and some corrections in .pkg files
[u/mrichter/AliRoot.git] / cmake / modules / FindGEANT4.cmake
CommitLineData
e969a926 1# - Try to find GEANT4
2# Once done this will define
3#
4# GEANT4_FOUND - system has GEANT4
5# GEANT4_INCLUDE_DIR - the GEANT4 include directory
6# GEANT4_LIBRARIES - The libraries needed to use GEANT4
7# GEANT4_DEFINITIONS - Compiler switches required for using GEANT4
8#
9
10if (GEANT4_INCLUDE_DIR AND GEANT4_LIBRARY_DIR)
11 SET (GEANT4_INCLUDE_DIR GEANT4_INCLUDE_DIR-NOTFOUND)
12 SET (GEANT4_LIB_DIR GEANT4_LIB_DIR-NOTFOUND)
13 SET (GEANT4_PLISTS_LIB_DIR GEANT4_PLISTS_LIB_DIR-NOTFOUND)
14 SET (GEANT4_DIR GEANT4_DIR-NOTFOUND)
15endif (GEANT4_INCLUDE_DIR AND GEANT4_LIBRARY_DIR)
16
17MESSAGE(STATUS "Looking for GEANT4...")
18
19FIND_PATH(GEANT4_DIR NAMES env.sh PATHS
20 ${SIMPATH}/transport/geant4
21 ${SIMPATH}/transport/geant4/source
22 NO_DEFAULT_PATH
23)
24
25FIND_PATH(GEANT4_INCLUDE_DIR NAMES G4Event.hh PATHS
26 ${SIMPATH}/transport/geant4/include
27 NO_DEFAULT_PATH
28)
29
30SET(GEANT4_INCLUDE_DIR
31${SIMPATH}/transport/geant4/include
32${SIMPATH}/transport/geant4/source/interfaces/common/include
33${SIMPATH}/transport/geant4/physics_lists/hadronic/Packaging/include
34${SIMPATH}/transport/geant4/physics_lists/hadronic/QGSP/include
35)
36
37FIND_PATH(GEANT4_LIB_DIR NAMES libG4baryons.so libG4baryons.dylib PATHS
38 ${SIMPATH}/transport/geant4/lib/Linux-g++
39 ${SIMPATH}/transport/geant4/lib/Linux-icc
40 ${SIMPATH}/transport/geant4/lib
41 NO_DEFAULT_PATH
42)
43
44IF (GEANT4_LIB_DIR)
45 SET(GEANT4_LIBRARY_DIR ${GEANT4_LIB_DIR})
46ENDIF (GEANT4_LIB_DIR)
47
48if (GEANT4_INCLUDE_DIR AND GEANT4_LIBRARY_DIR)
49 set(GEANT4_FOUND TRUE)
50endif (GEANT4_INCLUDE_DIR AND GEANT4_LIBRARY_DIR)
51
52if (GEANT4_FOUND)
53 if (NOT GEANT4_FIND_QUIETLY)
54 MESSAGE(STATUS "Looking for GEANT4... - found ${GEANT4_LIBRARY_DIR}")
55# message(STATUS "Found ${GEANT4_LIBRARY_DIR}")
56 endif (NOT GEANT4_FIND_QUIETLY)
57 SET(LD_LIBRARY_PATH ${LD_LIBRARY_PATH} ${GEANT4_LIBRARY_DIR})
58else (GEANT4_FOUND)
59 if (GEANT4_FIND_REQUIRED)
60 message(FATAL_ERROR "Looking for GEANT4... - Not found")
61 endif (GEANT4_FIND_REQUIRED)
62endif (GEANT4_FOUND)
63