]> git.uio.no Git - u/mrichter/AliRoot.git/blob - cmake/FindFASTJET.cmake
*** V interface for TPCCalibTasks ***
[u/mrichter/AliRoot.git] / cmake / FindFASTJET.cmake
1 # AliRoot Build System Module to find and configure FASTJET
2 #
3 # Author: Marco van Leeuwen
4 #
5 # Simple first version; checks env variables and fastjet-config; verifies that fastjet/PseudoJet.hh exists
6
7 cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
8
9 # FASTJET_ROOT is a legacy env variable; could be removed
10 if (NOT FASTJET)
11   set(FASTJET $ENV{FASTJET_ROOT})
12 endif(NOT FASTJET)
13
14 if (NOT FASTJET)
15   set(FASTJET $ENV{FASTJET})
16 endif(NOT FASTJET)
17
18 if (NOT FASTJET)
19   execute_process (COMMAND fastjet-config --prefix OUTPUT_VARIABLE FASTJET)
20   string (STRIP "${FASTJET}" FASTJET)
21 endif(NOT FASTJET)
22
23 # Check for one of the header files
24 if (FASTJET)
25   find_path(FASTJET include/fastjet/PseudoJet.hh PATHS ${FASTJET})
26   if (FASTJET-NOTFOUND)
27     message(STATUS "Header file fastjet/PseudoJet.hh not found in ${FASTJET}/include")
28   endif (FASTJET-NOTFOUND)
29 endif (FASTJET)
30
31 if (FASTJET AND NOT FASTJET-NOTFOUND) 
32   message(STATUS "FASTJET found in ${FASTJET}")
33   set (FASTJET_FOUND true)
34   set (FASTJET_INCLUDE_DIR ${FASTJET}/include)
35   message(STATUS "FASTJET include directory: ${FASTJET_INCLUDE_DIR}")
36   set (FASTJET_DEFINITIONS -DHAVE_FASTJET)
37 else()
38   message(STATUS "FASTJET not found; make sure to set the FASTJET_ROOT environment variable or have fastjet-config in your path to use fastjet")
39   set (FASTJET)
40 endif(FASTJET AND NOT FASTJET-NOTFOUND)
41