]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MONITOR/monitorGDC/CMakeLists.txt
3ded823d73f8a53e5e880e3a13e99a5bbbad8177
[u/mrichter/AliRoot.git] / MONITOR / monitorGDC / CMakeLists.txt
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
16 set(MODULE monitorGDC)
17
18 # Module include folder
19 include_directories(${AliRoot_SOURCE_DIR}/MONITOR/${MODULE}
20                    )
21
22 # Additional include folders in alphabetical order
23 include_directories(${ROOT_INCLUDE_DIR}
24                               ${AliRoot_SOURCE_DIR}
25                    )
26
27 if(DATE_FOUND)
28     include_directories(
29                         ${AliRoot_SOURCE_DIR}/ITS/ITSbase
30                         ${AliRoot_SOURCE_DIR}/RAW/RAWDatarec
31                         ${AliRoot_SOURCE_DIR}/STEER/ESD
32                         ${AliRoot_SOURCE_DIR}/STEER/STEER
33                        )
34 endif(DATE_FOUND)
35
36 # Sources in alphabetical order
37 set(SRCS
38     monitorGDC.cxx
39    )
40
41 # Headers from sources
42 string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
43
44 if(DIMDIR AND ODIR)
45     link_directories(${DIMDIR}/${ODIR})
46 endif()
47
48 # Add an executable to the project using the specified source files
49 add_executable(${MODULE} ${SRCS})
50
51 set(MODULE_COMPILE_FLAGS)
52 set(MODULE_LINK_FLAGS)
53 set(MODULE_DEPENDENCIES Core)
54
55 if(DATE_FOUND)
56     set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS}")
57     set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${DATE_LIBS} ${DATE_DYNMONLIBS}")
58
59     set(MODULE_DEPENDENCIES STEER ESD RAWDatarec ITSbase ${MODULE_DEPENDENCIES})
60 endif(DATE_FOUND)
61
62 if(ZEROMQ_FOUND)
63     set(MODULE_DEPENDENCIES MONITORzmq ${MODULE_DEPENDENCIES})
64     add_definitions(-DZMQ)
65 ENDIF(ZEROMQ_FOUND)
66
67 target_link_libraries(${MODULE} ${MODULE_DEPENDENCIES})
68
69 # Additional compilation and linking flags
70 set(MODULE_COMPILE_FLAGS " ${MODULE_COMPILE_FLAGS}")
71
72 # System dependent: Modify the way the library is build
73 if(${CMAKE_SYSTEM} MATCHES Darwin)
74     set(MODULE_LINK_FLAGS "-undefined dynamic_lookup ${MODULE_LINK_FLAGS}")
75 endif(${CMAKE_SYSTEM} MATCHES Darwin)
76
77 # Setting target compile and linking flags
78 set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}")
79 set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
80
81 # Installation
82 install(TARGETS ${MODULE} RUNTIME DESTINATION bin)