]>
Commit | Line | Data |
---|---|---|
56966a5e | 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 | # Module | |
17 | set(MODULE ITSbase) | |
18 | ||
19 | # Module include folder | |
427d561c | 20 | include_directories(${AliRoot_SOURCE_DIR}/ITS/${MODULE}) |
56966a5e | 21 | |
22 | # Additional include folders in alphabetical order except ROOT | |
f0315837 | 23 | include_directories(${ROOT_INCLUDE_DIR} |
427d561c | 24 | ${AliRoot_SOURCE_DIR}/RAW/RAWDatabase |
25 | ${AliRoot_SOURCE_DIR}/RAW/RAWDatarec | |
26 | ${AliRoot_SOURCE_DIR}/RAW/RAWDatasim | |
27 | ${AliRoot_SOURCE_DIR}/RAW/dateStream | |
28 | ${AliRoot_SOURCE_DIR}/STEER/CDB | |
29 | ${AliRoot_SOURCE_DIR}/STEER/ESD | |
30 | ${AliRoot_SOURCE_DIR}/STEER/STEERBase | |
31 | ${AliRoot_SOURCE_DIR}/STEER/STEER | |
56966a5e | 32 | ) |
33 | ||
34 | # Sources in alphabetical order | |
35 | set(SRCS | |
36 | AliITSBadChannelsSSD.cxx | |
37 | AliITSBadChannelsSSDv2.cxx | |
38 | AliITSCalibration.cxx | |
39 | AliITSCalibrationSDD.cxx | |
40 | AliITSCalibrationSPD.cxx | |
41 | AliITSCalibrationSSD.cxx | |
42 | AliITSChannelDaSSD.cxx | |
43 | AliITSChannelStatus.cxx | |
efc69e78 | 44 | AliITSClusterFinder.cxx |
45 | AliITSClusterFinderSDDfast.cxx | |
46 | AliITSClusterFinderV2SDD.cxx | |
47 | AliITSClusterFinderV2SPD.cxx | |
48 | AliITSClusterFinderV2SSD.cxx | |
49 | AliITSClusterParam.cxx | |
50 | AliITSclusterTable.cxx | |
56966a5e | 51 | AliITSclusterV2.cxx |
52 | AliITSCompressRawDataSDD.cxx | |
53 | AliITSCorrMap1DSDD.cxx | |
54 | AliITSCorrMap2DSDD.cxx | |
55 | AliITSCorrMapSDD.cxx | |
56 | AliITSDCSAnalyzerSDD.cxx | |
57 | AliITSDCSDataSDD.cxx | |
58 | AliITSDDLModuleMapSDD.cxx | |
59 | AliITSDDLRawData.cxx | |
60 | AliITSdEdxSamples.cxx | |
efc69e78 | 61 | AliITSDetTypeRec.cxx |
56966a5e | 62 | AliITSdigit.cxx |
63 | AliITSdigitSDD.cxx | |
64 | AliITSdigitSPD.cxx | |
65 | AliITSdigitSSD.cxx | |
66 | AliITSDriftSpeedArraySDD.cxx | |
67 | AliITSDriftSpeedSDD.cxx | |
68 | AliITSEventHeader.cxx | |
efc69e78 | 69 | AliITSFOSignalsSPD.cxx |
56966a5e | 70 | AliITSGainSSD.cxx |
71 | AliITSGainSSDv2.cxx | |
72 | AliITSgeom.cxx | |
73 | AliITSgeomMatrix.cxx | |
74 | AliITSgeomTGeo.cxx | |
56966a5e | 75 | AliITSHLTforSDD.cxx |
76 | AliITSInitGeometry.cxx | |
77 | AliITSIntMap.cxx | |
78 | AliITSIntMapNode.cxx | |
79 | AliITSLoader.cxx | |
80 | AliITSMapA1.cxx | |
81 | AliITSMapA2.cxx | |
82 | AliITSMap.cxx | |
83 | AliITSMapSDD.cxx | |
84 | AliITSMisAligner.cxx | |
85 | AliITSModuleDaSSD.cxx | |
efc69e78 | 86 | AliITSMultReconstructor.cxx |
56966a5e | 87 | AliITSNoiseSSD.cxx |
88 | AliITSNoiseSSDv2.cxx | |
89 | AliITSPedestalSSD.cxx | |
90 | AliITSPedestalSSDv2.cxx | |
91 | AliITSPlaneEff.cxx | |
92 | AliITSPlaneEffSDD.cxx | |
93 | AliITSPlaneEffSPD.cxx | |
94 | AliITSPlaneEffSSD.cxx | |
95 | AliITSpList.cxx | |
96 | AliITSpListItem.cxx | |
efc69e78 | 97 | AliITSQAChecker.cxx |
98 | AliITSQADataMakerRec.cxx | |
99 | AliITSQASDDChecker.cxx | |
100 | AliITSQASPDChecker.cxx | |
101 | AliITSQASSDChecker.cxx | |
102 | AliITSQASDDDataMakerRec.cxx | |
103 | AliITSQASPDDataMakerRec.cxx | |
104 | AliITSQASSDDataMakerRec.cxx | |
56966a5e | 105 | AliITSRawStream.cxx |
106 | AliITSRawStreamSDDCompressed.cxx | |
107 | AliITSRawStreamSDD.cxx | |
108 | AliITSRawStreamSPD.cxx | |
109 | AliITSRawStreamSPDErrorLog.cxx | |
110 | AliITSRawStreamSSD.cxx | |
111 | AliITSRawStreamSSDv1.cxx | |
efc69e78 | 112 | AliITSReconstructor.cxx |
113 | AliITSRecoParam.cxx | |
56966a5e | 114 | AliITSRecPoint.cxx |
efc69e78 | 115 | AliITSRecPointContainer.cxx |
56966a5e | 116 | AliITSresponse.cxx |
117 | AliITSresponseSDD.cxx | |
118 | AliITSresponseSPD.cxx | |
119 | AliITSsegmentation.cxx | |
120 | AliITSsegmentationSDD.cxx | |
121 | AliITSsegmentationSPD.cxx | |
122 | AliITSsegmentationSSD.cxx | |
efc69e78 | 123 | AliITSSortTrkl.cxx |
56966a5e | 124 | AliITSSurveyToAlign.cxx |
efc69e78 | 125 | AliITStrackMI.cxx |
126 | AliITStrackerMI.cxx | |
127 | AliITSTracklPairs.cxx | |
128 | AliITStrackSA.cxx | |
129 | AliITStrackV2.cxx | |
130 | AliITStrackerSA.cxx | |
131 | AliITStrackerV2.cxx | |
56966a5e | 132 | AliITSTransientDigit.cxx |
133 | AliITSTriggerAlgorithmConditions.cxx | |
134 | AliITSTriggerConditions.cxx | |
efc69e78 | 135 | AliITSV0Finder.cxx |
136 | AliITSVertexer.cxx | |
137 | AliITSVertexer3D.cxx | |
138 | AliITSVertexerCosmics.cxx | |
139 | AliITSVertexerFast.cxx | |
140 | AliITSVertexerFixed.cxx | |
141 | AliITSVertexerZ.cxx | |
142 | AliITSVertexerZD.cxx | |
143 | AliITSZPoint.cxx | |
56966a5e | 144 | ) |
087b5ece | 145 | if (DATE_FOUND) |
48bb5b02 | 146 | set (SRCS ${SRCS} "AliITSHandleDaSSD.cxx") |
90dcc14b | 147 | # set the definitions per folder to be passed to ROOT |
cae58aab | 148 | set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS}") |
149 | set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${DATE_LIBS} ${DATE_DYNMONLIBS}") | |
087b5ece | 150 | endif (DATE_FOUND) |
56966a5e | 151 | |
152 | # Headers from sources | |
153 | string(REPLACE ".cxx" ".h" HDRS "${SRCS}") | |
154 | ||
155 | # Generate the dictionary | |
156 | # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument | |
157 | get_directory_property(incdirs INCLUDE_DIRECTORIES) | |
38cadb35 | 158 | generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}" "${MODULE_COMPILE_FLAGS}") |
56966a5e | 159 | |
f5b3b5d7 | 160 | # Setting the dependencies |
efc69e78 | 161 | set(ROOT_DEPENDENCIES Core EG GenVector Geom Gpad Graf3d Graf Gui HistPainter Hist MathCore Matrix Minuit Physics RIO Tree) |
162 | set(ALIROOT_DEPENDENCIES CDB ESD STEERBase STEER RAWDatabase RAWDatarec RAWDatasim) | |
f5b3b5d7 | 163 | |
56966a5e | 164 | # Generate the ROOT map |
165 | # Dependecies | |
f5b3b5d7 | 166 | set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES}) |
56966a5e | 167 | generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h") |
168 | ||
f5b3b5d7 | 169 | # Create an object to be reused in case of static libraries |
170 | # Otherwise the sources will be compiled twice | |
171 | add_library(${MODULE}-object OBJECT ${SRCS} G__${MODULE}.cxx) | |
172 | # Add a library to the project using the object | |
68aeb13b | 173 | add_library(${MODULE} SHARED $<TARGET_OBJECTS:${MODULE}-object>) |
174 | ||
f5b3b5d7 | 175 | target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES}) |
56966a5e | 176 | |
4d31eb1c | 177 | # Public include folders that will be propagated to the dependecies |
178 | target_include_directories(${MODULE} PUBLIC ${incdirs}) | |
179 | ||
56966a5e | 180 | # System dependent: Modify the way the library is build |
181 | if(${CMAKE_SYSTEM} MATCHES Darwin) | |
cae58aab | 182 | set(MODULE_LINK_FLAGS "-undefined dynamic_lookup ${MODULE_LINK_FLAGS}") |
56966a5e | 183 | endif(${CMAKE_SYSTEM} MATCHES Darwin) |
184 | ||
cae58aab | 185 | # Aditional compile and link flags |
186 | set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}") | |
187 | set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") | |
188 | ||
189 | # Setting the correct headers for the object as gathered from the dependencies | |
190 | # After all compilation flags are set | |
191 | target_include_directories(${MODULE}-object PUBLIC $<TARGET_PROPERTY:${MODULE},INCLUDE_DIRECTORIES>) | |
192 | set_target_properties(${MODULE}-object PROPERTIES COMPILE_DEFINITIONS $<TARGET_PROPERTY:${MODULE},COMPILE_DEFINITIONS>) | |
193 | ||
56966a5e | 194 | # Installation |
195 | install(TARGETS ${MODULE} | |
196 | ARCHIVE DESTINATION lib | |
197 | LIBRARY DESTINATION lib) | |
198 | ||
f5b3b5d7 | 199 | install(FILES ${HDRS} DESTINATION include) |
200 | ||
201 | # Static version if DA enabled | |
202 | if(ALIROOT_STATIC) | |
68aeb13b | 203 | add_library(${MODULE}-static STATIC $<TARGET_OBJECTS:${MODULE}-object>) |
f5b3b5d7 | 204 | set_target_properties(${MODULE}-static PROPERTIES OUTPUT_NAME ${MODULE}) |
205 | ||
206 | # list of shared dependencies / the name of the variable containing the list of static ones | |
207 | generate_static_dependencies("${ALIROOT_DEPENDENCIES}" "STATIC_ALIROOT_DEPENDENCIES") | |
208 | target_link_libraries(${MODULE}-static ${STATIC_ALIROOT_DEPENDENCIES} Root) | |
4d31eb1c | 209 | |
210 | # Public include folders that will be propagated to the dependecies | |
211 | target_include_directories(${MODULE}-static PUBLIC ${incdirs}) | |
212 | ||
f5b3b5d7 | 213 | set_target_properties(${MODULE}-static PROPERTIES LINK_FLAGS "-Wl,--whole-archive") |
214 | ||
215 | # Installation | |
216 | install(TARGETS ${MODULE}-static | |
217 | ARCHIVE DESTINATION lib | |
218 | LIBRARY DESTINATION lib) | |
219 | endif(ALIROOT_STATIC) |