Additional patch for #83850: Please consider deprecating CINTAUTOLINK (Christian)
[u/mrichter/AliRoot.git] / cmake / FindAMORE.cmake
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
6 cmake_minimum_required(VERSION 2.8.4 FATAL_ERROR)
7
8 find_program(AMORE_CONFIG NAMES amore-config)
9 if(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)
13   execute_process(COMMAND ${AMORE_CONFIG} --ldflags --ldflags-da-static --libs OUTPUT_VARIABLE _lddaflags OUTPUT_STRIP_TRAILING_WHITESPACE)
14   ALICE_CleanOutput(_lddaflags "${_lddaflags}")
15   if(DATE_FOUND)
16     execute_process(COMMAND ${DATE_CONFIG} --rcproxylibs OUTPUT_VARIABLE _rcproxylib OUTPUT_STRIP_TRAILING_WHITESPACE)
17   else()
18     message(STATUS "AMORE requires DATE")
19   endif(DATE_FOUND)
20   set(AMOREDALIBS "-static ${_lddaflags} ${_rcproxylib}")
21 else()
22   message(STATUS "AMORE not found")
23 endif(AMORE_CONFIG)