]>
Commit | Line | Data |
---|---|---|
e9e48ff1 | 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 STEERBase) | |
18 | ||
19 | # Module include folder | |
427d561c | 20 | include_directories(${AliRoot_SOURCE_DIR}/STEER/${MODULE}) |
e9e48ff1 | 21 | |
22 | # Additional includes - alphabetical order except ROOT | |
f19da7e9 | 23 | include_directories(${ROOT_INCLUDE_DIRS} |
24 | ${AliRoot_BINARY_DIR}/version | |
25 | ) | |
e9e48ff1 | 26 | |
27 | # Sources - alphabetical order | |
28 | set(SRCS | |
29 | AliCentrality.cxx | |
30 | AliCheb3DCalc.cxx | |
31 | AliCheb3D.cxx | |
394b05d9 | 32 | AliCodeTimer.cxx |
e9e48ff1 | 33 | AliCollisionGeometry.cxx |
34 | AliCounterCollection.cxx | |
35 | AliDAQ.cxx | |
36 | AliDetectorEventHeader.cxx | |
37 | AliDetectorPID.cxx | |
38 | AliDetectorTagCuts.cxx | |
39 | AliDetectorTag.cxx | |
40 | AliDummyHandler.cxx | |
41 | AliEMCALPIDResponse.cxx | |
42 | AliEventplane.cxx | |
43 | AliEventTagCuts.cxx | |
44 | AliEventTag.cxx | |
45 | AliExternalTrackParam.cxx | |
46 | AliFileTag.cxx | |
47 | AliGenCocktailEventHeader.cxx | |
48 | AliGenDPMjetEventHeader.cxx | |
49 | AliGenEposEventHeader.cxx | |
50 | AliGenEventHeader.cxx | |
51 | AliGenEventHeaderTunedPbPb.cxx | |
52 | AliGenGeVSimEventHeader.cxx | |
53 | AliGenHepMCEventHeader.cxx | |
54 | AliGenHerwigEventHeader.cxx | |
55 | AliGenHijingEventHeader.cxx | |
56 | AliGenPythiaEventHeader.cxx | |
57 | AliHeader.cxx | |
58 | AliHMPIDPIDParams.cxx | |
59 | AliHMPIDPIDResponse.cxx | |
60 | AliInputEventHandler.cxx | |
61 | AliITSPidParams.cxx | |
62 | AliITSPIDResponse.cxx | |
63 | AliLHCTagCuts.cxx | |
64 | AliLHCTag.cxx | |
65 | AliLog.cxx | |
66 | AliMagF.cxx | |
67 | AliMagWrapCheb.cxx | |
68 | AliMathBase.cxx | |
69 | AliMCEvent.cxx | |
70 | AliMCEventHandler.cxx | |
71 | AliMCParticle.cxx | |
72 | AliMCVertex.cxx | |
73 | AliMergeableCollection.cxx | |
74 | AliMixedEvent.cxx | |
75 | AliNeutralTrackParam.cxx | |
76 | AliOADBContainer.cxx | |
77 | AliPDG.cxx | |
78 | AliPIDCombined.cxx | |
79 | AliPID.cxx | |
80 | AliPIDResponse.cxx | |
81 | AliPIDValues.cxx | |
82 | AliProdInfo.cxx | |
83 | AliQA.cxx | |
84 | AliRefArray.cxx | |
85 | AliRunTagCuts.cxx | |
86 | AliRunTag.cxx | |
87 | AliStack.cxx | |
88 | AliSysInfo.cxx | |
89 | AliTagCreator.cxx | |
90 | AliTimeStamp.cxx | |
91 | AliTOFHeader.cxx | |
92 | AliTOFPIDParams.cxx | |
93 | AliTOFPIDResponse.cxx | |
94 | AliTOFTriggerMask.cxx | |
95 | AliTPCdEdxInfo.cxx | |
96 | AliTPCPIDResponse.cxx | |
97 | AliTrackReference.cxx | |
98 | AliTRDdEdxParams.cxx | |
99 | AliTRDNDFast.cxx | |
100 | AliTRDPIDParams.cxx | |
101 | AliTRDPIDReference.cxx | |
102 | AliTRDPIDResponse.cxx | |
103 | AliTRDPIDResponseObject.cxx | |
104 | AliTRDTKDInterpolator.cxx | |
105 | AliTriggerScalers.cxx | |
106 | AliTriggerScalersRecord.cxx | |
11c03f22 | 107 | AliVAD.cxx |
e9e48ff1 | 108 | AliVAODHeader.cxx |
109 | AliVCaloCells.cxx | |
110 | AliVCaloTrigger.cxx | |
111 | AliVCluster.cxx | |
112 | AliVCuts.cxx | |
f19da7e9 | 113 | AliVersion.cxx |
e9e48ff1 | 114 | AliVEvent.cxx |
115 | AliVEventHandler.cxx | |
116 | AliVEventPool.cxx | |
117 | AliVfriendEvent.cxx | |
118 | AliVfriendTrack.cxx | |
119 | AliVHeader.cxx | |
120 | AliVMFT.cxx | |
121 | AliVMisc.cxx | |
122 | AliVMultiplicity.cxx | |
123 | AliVParticle.cxx | |
124 | AliVTOFcluster.cxx | |
125 | AliVTOFHit.cxx | |
126 | AliVTOFMatch.cxx | |
faee5c57 | 127 | AliVTPCseed.cxx |
e9e48ff1 | 128 | AliVTrack.cxx |
129 | AliVTrdTrack.cxx | |
130 | AliVTrdTracklet.cxx | |
131 | AliVVertex.cxx | |
132 | AliVVZERO.cxx | |
133 | AliVZDC.cxx | |
134 | TTreeStream.cxx | |
135 | ) | |
136 | ||
137 | # Headers from sources | |
138 | string(REPLACE ".cxx" ".h" HDRS "${SRCS}") | |
139 | ||
140 | # Generate the dictionary | |
141 | # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument | |
142 | get_directory_property(incdirs INCLUDE_DIRECTORIES) | |
143 | generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}") | |
144 | ||
f82bfa66 | 145 | # Create an object to be reused in case of static libraries |
146 | # Otherwise the sources will be compiled twice | |
147 | add_library(STEERBase-object OBJECT ${SRCS} G__${MODULE}.cxx) | |
148 | # Add a library to the project using the object | |
149 | add_library(STEERBase SHARED $<TARGET_OBJECTS:STEERBase-object>) | |
e9e48ff1 | 150 | |
3fb90aee | 151 | # Generate the ROOT map |
152 | # Dependecies | |
27d54f3d | 153 | set(LIBDEPS Core EG Geom Gpad Graf3d Graf Hist MathCore Matrix Minuit Net Physics RIO Tree VMC) |
f82bfa66 | 154 | generate_rootmap("STEERBase" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h") |
3fb90aee | 155 | |
f82bfa66 | 156 | # Additional compilation flags for the object |
139cbc46 | 157 | set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS "") |
f82bfa66 | 158 | # Linking the library, not the object |
d76274fd | 159 | target_link_libraries(${MODULE} ${LIBDEPS}) |
6929fcdd | 160 | |
161 | # Public include folders that will be propagated to the dependecies | |
162 | target_include_directories(${MODULE} PUBLIC ${incdirs}) | |
e9e48ff1 | 163 | |
164 | # System dependent: Modify the way the library is build | |
165 | if(${CMAKE_SYSTEM} MATCHES Darwin) | |
f82bfa66 | 166 | set_target_properties(STEERBase PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") |
e9e48ff1 | 167 | endif(${CMAKE_SYSTEM} MATCHES Darwin) |
168 | ||
169 | # Installation | |
170 | install(TARGETS ${MODULE} | |
171 | ARCHIVE DESTINATION lib | |
172 | LIBRARY DESTINATION lib) | |
173 | install(FILES ${HDRS} DESTINATION include) | |
f82bfa66 | 174 | |
175 | # Static version if DA enabled | |
176 | if(ALIROOT_STATIC) | |
177 | add_library(${MODULE}-static STATIC $<TARGET_OBJECTS:STEERBase-object>) | |
178 | set_target_properties(${MODULE}-static PROPERTIES OUTPUT_NAME ${MODULE}) | |
179 | set_target_properties(${MODULE}-static PROPERTIES LINK_FLAGS "-Wl,--whole-archive") | |
9cfdd3fd | 180 | target_link_libraries(${MODULE}-static Root RootExtra) |
f82bfa66 | 181 | |
d1d7d34a | 182 | # Public include folders that will be propagated to the dependecies |
183 | target_include_directories(${MODULE}-static PUBLIC ${incdirs}) | |
184 | ||
f82bfa66 | 185 | # Installation |
186 | install(TARGETS ${MODULE}-static | |
187 | ARCHIVE DESTINATION lib | |
188 | LIBRARY DESTINATION lib) | |
189 | endif(ALIROOT_STATIC) |