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