]> git.uio.no Git - u/mrichter/AliRoot.git/blame - cmake/FindFASTJET.cmake
Add FASTJET package definition/finding macro for general use; use FASTJET_FOUND varia...
[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#
5# Simple first version; checks env variables and fastjet-config; does not verify that includes and libs are really present
6
7cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
8
9set(FASTJET_ROOT $ENV{FASTJET_ROOT})
10
11if (NOT FASTJET_ROOT)
12 set(FASTJET_ROOT $ENV{FASTJET})
13endif(NOT FASTJET_ROOT)
14
15if (NOT FASTJET_ROOT)
16 execute_process (COMMAND fastjet-config --prefix OUTPUT_VARIABLE FASTJET_ROOT)
17 string (STRIP ${FASTJET_ROOT} FASTJET_ROOT)
18endif(NOT FASTJET_ROOT)
19
20if (FASTJET_ROOT)
21 message(STATUS "FASTJET found in ${FASTJET_ROOT}")
22 set (FASTJET_FOUND true)
23 set (FASTJET_INCLUDE_DIR ${FASTJET_ROOT}/include)
24 message(STATUS "FASTJET include directory: ${FASTJET_INCLUDE_DIR}")
25 set (FASTJET_DEFINITIONS -DHAVE_FASTJET)
26else()
27 message(STATUS "FASTJET not found; make sure to set the FASTJET_ROOT environment variable or have fastjet-config in your path to use fastjet")
28endif(FASTJET_ROOT)
29