#102886: Various fixes to the the code in EVE, STEER, PWGPP, cmake
[u/mrichter/AliRoot.git] / cmake / FindAMORE.cmake
CommitLineData
6db31708 1# AliRoot Build System Module to find and configure AMORE
2#
3# Author: Johny Jose (johny.jose@cern.ch)
4# Port of previous Makefile build to cmake
5
6b06712c 6cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
6db31708 7
8find_program(AMORE_CONFIG NAMES amore-config)
9if(AMORE_CONFIG)
10 set(AMORE_FOUND TRUE)
11 set(AMOREDEFINITIONS "-DALI_AMORE")
12 execute_process(COMMAND ${AMORE_CONFIG} --cflags --includes OUTPUT_VARIABLE AMOREFLAGS OUTPUT_STRIP_TRAILING_WHITESPACE)
45526b5e 13 execute_process(COMMAND ${AMORE_CONFIG} --ldflags --ldflags-da-static --libs OUTPUT_VARIABLE _lddaflags OUTPUT_STRIP_TRAILING_WHITESPACE)
6db31708 14 ALICE_CleanOutput(_lddaflags "${_lddaflags}")
6645cec4 15 set(AMOREFLAGS "-DALI_AMORE ${AMOREFLAGS}")
6db31708 16 if(DATE_FOUND)
17 execute_process(COMMAND ${DATE_CONFIG} --rcproxylibs OUTPUT_VARIABLE _rcproxylib OUTPUT_STRIP_TRAILING_WHITESPACE)
18 else()
19 message(STATUS "AMORE requires DATE")
20 endif(DATE_FOUND)
21 set(AMOREDALIBS "-static ${_lddaflags} ${_rcproxylib}")
6645cec4 22 else()
6db31708 23 message(STATUS "AMORE not found")
24endif(AMORE_CONFIG)