]> git.uio.no Git - u/mrichter/AliRoot.git/blame - cmake/FindFASTJET.cmake
-add TSpline for on-the-efficiencies
[u/mrichter/AliRoot.git] / cmake / FindFASTJET.cmake
CommitLineData
ebc98c6f 1# AliRoot Build System Module to find and configure FASTJET
2#
3# Author: Marco van Leeuwen
4#
21b7b816 5# Simple first version; checks env variables and fastjet-config; verifies that fastjet/PseudoJet.hh exists
ebc98c6f 6
7cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
8
21b7b816 9# FASTJET_ROOT is a legacy env variable; could be removed
10if (NOT FASTJET)
11 set(FASTJET $ENV{FASTJET_ROOT})
12endif(NOT FASTJET)
ebc98c6f 13
21b7b816 14if (NOT FASTJET)
15 set(FASTJET $ENV{FASTJET})
16endif(NOT FASTJET)
ebc98c6f 17
21b7b816 18if (NOT FASTJET)
19 execute_process (COMMAND fastjet-config --prefix OUTPUT_VARIABLE FASTJET)
20 string (STRIP "${FASTJET}" FASTJET)
21endif(NOT FASTJET)
ebc98c6f 22
21b7b816 23# Check for one of the header files
24if (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)
29endif (FASTJET)
30
31if (FASTJET AND NOT FASTJET-NOTFOUND)
32 message(STATUS "FASTJET found in ${FASTJET}")
ebc98c6f 33 set (FASTJET_FOUND true)
21b7b816 34 set (FASTJET_INCLUDE_DIR ${FASTJET}/include)
ebc98c6f 35 message(STATUS "FASTJET include directory: ${FASTJET_INCLUDE_DIR}")
36 set (FASTJET_DEFINITIONS -DHAVE_FASTJET)
37else()
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")
48573d20 39 set (FASTJET)
21b7b816 40endif(FASTJET AND NOT FASTJET-NOTFOUND)
ebc98c6f 41