Correct value for ROOT_HAS*
[u/mrichter/AliRoot.git] / MONITOR / monitorGDC / CMakeLists.txt
CommitLineData
3c77e1ef 1# **************************************************************************
2# * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
3# * *
4# * Author: The ALICE Off-line Project. *
5# * Contributors are mentioned in the code where appropriate. *
6# * *
7# * Permission to use, copy, modify and distribute this software and its *
8# * documentation strictly for non-commercial purposes is hereby granted *
9# * without fee, provided that the above copyright notice appears in all *
10# * copies and that both the copyright notice and this permission notice *
11# * appear in the supporting documentation. The authors make no claims *
12# * about the suitability of this software for any purpose. It is *
13# * provided "as is" without express or implied warranty. *
14# **************************************************************************
15
16set(MODULE monitorGDC)
17
18# Module include folder
19include_directories(${AliRoot_SOURCE_DIR}/MONITOR/${MODULE}
20 )
21
22# Additional include folders in alphabetical order
23include_directories(${AliRoot_SOURCE_DIR}
24 )
25
4d31eb1c 26if(DATE_FOUND)
27 include_directories(
28 ${AliRoot_SOURCE_DIR}/ITS/ITSbase
29 ${AliRoot_SOURCE_DIR}/RAW/RAWDatarec
30 ${AliRoot_SOURCE_DIR}/STEER/ESD
31 ${AliRoot_SOURCE_DIR}/STEER/STEER
32 )
33endif(DATE_FOUND)
34
3c77e1ef 35# Sources in alphabetical order
36set(SRCS
37 monitorGDC.cxx
38 )
39
40# Headers from sources
41string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
42
43if(DIMDIR AND ODIR)
44 link_directories(${DIMDIR}/${ODIR})
45endif()
46
47# Add an executable to the project using the specified source files
48add_executable(${MODULE} ${SRCS})
3c77e1ef 49
ca331a9c 50set(MODULE_COMPILE_FLAGS)
51set(MODULE_LINK_FLAGS)
4d31eb1c 52set(MODULE_DEPENDENCIES Core)
ca331a9c 53
3c77e1ef 54if(DATE_FOUND)
ca331a9c 55 set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS}")
4d31eb1c 56 set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${DATE_LIBS} ${DATE_DYNMONLIBS}")
57
58 set(MODULE_DEPENDENCIES STEER ESD RAWDatarec ITSbase ${MODULE_DEPENDENCIES})
ca331a9c 59endif(DATE_FOUND)
60
4d31eb1c 61if(ZEROMQ_FOUND)
62 set(MODULE_DEPENDENCIES MONITORzmq ${MODULE_DEPENDENCIES})
63 add_definitions(-DZMQ)
64ENDIF(ZEROMQ_FOUND)
65
66target_link_libraries(${MODULE} ${MODULE_DEPENDENCIES})
67
ca331a9c 68# Additional compilation and linking flags
69set(MODULE_COMPILE_FLAGS "-O -g ${MODULE_COMPILE_FLAGS}")
70
71# System dependent: Modify the way the library is build
72if(${CMAKE_SYSTEM} MATCHES Darwin)
73 set(MODULE_LINK_FLAGS "-undefined dynamic_lookup ${MODULE_LINK_FLAGS}")
74endif(${CMAKE_SYSTEM} MATCHES Darwin)
75
76# Setting target compile and linking flags
77set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}")
78set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
3c77e1ef 79
3c77e1ef 80# Installation
81install(TARGETS ${MODULE} RUNTIME DESTINATION bin)