CMake: Find ApMon used for the Shuttle
[u/mrichter/AliRoot.git] / cmake / FindApMon.cmake
CommitLineData
1c5dc89d 1# Find for ApMon library
2# Setting:
3# - ApMon_LIBRARIES
4# - ApMon_INCLUDE_DIR
5
6set(ApMon_FOUND FALSE)
7
8if(ApMon)
9 # check for the existance of the ApMon library
10 find_library(ApMon_LIBRARIES NAMES apmoncpp PATHS ${ApMon}/lib NO_DEFAULT_PATH DOC "Path to ApMon library")
11
12 if(NOT ApMon_LIBRARIES)
13 message(FATAL_ERROR "Could not locate ApMon library inside ${ApMon}/lib")
14 else()
15 message(STATUS "Found ApMon library: ${ApMon_LIBRARIES}")
16 endif()
17
18 # check for the existance of the ApMin header
19 find_path(ApMon_INCLUDE_DIR NAMES ApMon.h PATHS ${ApMon}/include NO_DEFAULT_PATH DOC "Path to ApMon header folder.")
20
21 if(NOT ApMon_INCLUDE_DIR)
22 message(FATAL_ERROR "Could not find ApMon header inside ${ApMon}/include")
23 else()
24 message(STATUS "Found ApMon header folder: ${ApMon_INCLUDE_DIR}")
25 endif()
26
27 set(ApMon_FOUND TRUE)
28 mark_as_advanced(${ApMon_LIBRARIES} ${ApMon_INCLUDE_DI})
29else()
30 message(FATAL_ERROR "Please point to the ApMon installation using -DApMon=/install/point")
31endif(ApMon)