Preliminary files for CMake
[u/mrichter/AliRoot.git] / cmake / modules / FindCLHEP.cmake
1 # - Try to find CLHEP
2 # Once done this will define
3 #
4 #  CLHEP_FOUND - system has CLHEP
5 #  CLHEP_INCLUDE_DIR - the CLHEP include directory
6 #  CLHEP_LIBRARIES - The libraries needed to use CLHEP
7 #  CLHEP_DEFINITIONS - Compiler switches required for using CLHEP
8 #
9
10 if (CLHEP_INCLUDE_DIR AND CLHEP_LIBRARY_DIR)
11   SET (CLHEP_INCLUDE_DIR CLHEP_INCLUDE_DIR-NOTFOUND)
12   SET (CLHEP_LIB_DIR CLHEP_LIB_DIR-NOTFOUND)
13   SET (CLHEP_PLISTS_LIB_DIR CLHEP_PLISTS_LIB_DIR-NOTFOUND)
14 endif (CLHEP_INCLUDE_DIR AND CLHEP_LIBRARY_DIR)
15
16 MESSAGE(STATUS "Looking for CLHEP...")
17
18 FIND_PATH(CLHEP_INCLUDE_DIR NAMES CLHEP PATHS
19   ${SIMPATH}/cern/clhep/include
20   NO_DEFAULT_PATH
21 )
22
23 FIND_PATH(CLHEP_LIBRARY_DIR NAMES libCLHEP.so libCLHEP.dylib PATHS
24   ${SIMPATH}/cern/clhep/lib
25   NO_DEFAULT_PATH
26 )
27
28 if (CLHEP_INCLUDE_DIR AND CLHEP_LIBRARY_DIR)
29    set(CLHEP_FOUND TRUE)
30 endif (CLHEP_INCLUDE_DIR AND CLHEP_LIBRARY_DIR)
31
32 if (CLHEP_FOUND)
33   if (NOT CLHEP_FIND_QUIETLY)
34     MESSAGE(STATUS "Looking for CLHEP... - found ${CLHEP_LIBRARY_DIR}")
35 #    message(STATUS "Found CLHEP: ${CLHEP_LIBRARY_DIR}")
36     SET(LD_LIBRARY_PATH ${LD_LIBRARY_PATH} ${CLHEP_LIBRARY_DIR})
37   endif (NOT CLHEP_FIND_QUIETLY)
38 else (CLHEP_FOUND)
39   if (CLHEP_FIND_REQUIRED)
40     message(FATAL_ERROR "Looking for CLHEP... - Not found")
41   endif (CLHEP_FIND_REQUIRED)
42 endif (CLHEP_FOUND)
43