1 # AliRoot Build System Module to find and configure FASTJET
3 # Author: Marco van Leeuwen
5 # Simple first version; checks env variables and fastjet-config; verifies that fastjet/PseudoJet.hh exists
7 cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
9 # FASTJET_ROOT is a legacy env variable; could be removed
11 set(FASTJET $ENV{FASTJET_ROOT})
15 set(FASTJET $ENV{FASTJET})
19 execute_process (COMMAND fastjet-config --prefix OUTPUT_VARIABLE FASTJET)
20 string (STRIP "${FASTJET}" FASTJET)
23 # Check for one of the header files
25 find_path(FASTJET include/fastjet/PseudoJet.hh PATHS ${FASTJET})
27 message(STATUS "Header file fastjet/PseudoJet.hh not found in ${FASTJET}/include")
28 endif (FASTJET-NOTFOUND)
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)
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")
40 endif(FASTJET AND NOT FASTJET-NOTFOUND)