]> git.uio.no Git - u/mrichter/AliRoot.git/blame - TRD/TRDbase/CMakeLists.txt...
doxy: do not show whitespace diffs on bulk edit
[u/mrichter/AliRoot.git] / TRD / TRDbase / CMakeLists.txt...
CommitLineData
139cbc46 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
17set(MODULE TRDbase)
18
19# Module include folder
20include_directories(${AliRoot_SOURCE_DIR}/TRD/${MODULE})
21
22# Additional include folders in alphabetical order except ROOT
f0315837 23include_directories(${ROOT_INCLUDE_DIR}
139cbc46 24 ${AliRoot_SOURCE_DIR}/RAW/RAWDatabase
25 ${AliRoot_SOURCE_DIR}/RAW/RAWDatarec
26 ${AliRoot_SOURCE_DIR}/STEER/CDB
27 ${AliRoot_SOURCE_DIR}/STEER/ESD
28 ${AliRoot_SOURCE_DIR}/STEER/STEER
29 ${AliRoot_SOURCE_DIR}/STEER/STEERBase
30 )
31
32# Sources in alphabetical order
33set(SRCS
34 AliTRDalignment.cxx
35 AliTRDarrayADC.cxx
36 AliTRDarrayDictionary.cxx
37 AliTRDarraySignal.cxx
38 AliTRDCalChamberStatus.cxx
39 AliTRDCalDCS.cxx
40 AliTRDCalDCSFEE.cxx
41 AliTRDCalDCSFEEv2.cxx
42 AliTRDCalDCSGTUBoardInfo.cxx
43 AliTRDCalDCSGTUCtpOpc.cxx
44 AliTRDCalDCSGTU.cxx
45 AliTRDCalDCSGTUSegment.cxx
46 AliTRDCalDCSGTUTgu.cxx
47 AliTRDCalDCSGTUTmu.cxx
48 AliTRDCalDCSPTR.cxx
49 AliTRDCalDCSv2.cxx
50 AliTRDCalDet.cxx
51 AliTRDCalibChamberStatus.cxx
52 AliTRDcalibDB.cxx
53 AliTRDCalibPadStatus.cxx
54 AliTRDCalibraExbAltFit.cxx
55 AliTRDCalibraFillHisto.cxx
56 AliTRDCalibraFit.cxx
57 AliTRDCalibraMode.cxx
58 AliTRDCalibraVdriftLinearFit.cxx
59 AliTRDCalibraVector.cxx
60 AliTRDCalibViewer.cxx
61 AliTRDCalibViewerGUI.cxx
62 AliTRDCalMonitoring.cxx
63 AliTRDCalOnlineGainTable.cxx
64 AliTRDCalOnlineGainTableMCM.cxx
65 AliTRDCalOnlineGainTableROC.cxx
66 AliTRDCalPad.cxx
67 AliTRDCalPadStatus.cxx
68 AliTRDCalPID.cxx
69 AliTRDCalROC.cxx
70 AliTRDCalSingleChamberStatus.cxx
71 AliTRDCalTrapConfig.cxx
72 AliTRDCalTrkAttach.cxx
73 AliTRDchamberTimeBin.cxx
74 AliTRDCommonParam.cxx
75 AliTRDcluster.cxx
76 AliTRDclusterizer.cxx
77 AliTRDDataDCS.cxx
78 AliTRDdEdxBaseUtils.cxx
79 AliTRDdEdxCalibHistArray.cxx
80 AliTRDdEdxCalibUtils.cxx
81 AliTRDdEdxReconUtils.cxx
82 AliTRDdigit.cxx
83 AliTRDdigitsManager.cxx
84 AliTRDdigitsParam.cxx
85 AliTRDEntriesInfo.cxx
86 AliTRDfeeParam.cxx
87 AliTRDgeometry.cxx
88 AliTRDgtuParam.cxx
89 AliTRDgtuSim.cxx
90 AliTRDgtuTMU.cxx
91 AliTRDhit.cxx
92 AliTRDltuParam.cxx
93 AliTRDmcmSim.cxx
94 AliTRDonlineTrackMatching.cxx
95 AliTRDpadPlane.cxx
96 AliTRDPhInfo.cxx
97 AliTRDpidUtil.cxx
98 AliTRDPreprocessor.cxx
99 AliTRDPrfInfo.cxx
100 AliTRDQAChecker.cxx
101 AliTRDrawData.cxx
102 AliTRDrawStream.cxx
103 AliTRDrecoParam.cxx
104 AliTRDReconstructor.cxx
105 AliTRDSaxHandler.cxx
106 AliTRDseedV1.cxx
107 AliTRDSensorArray.cxx
108 AliTRDSensor.cxx
109 AliTRDSignalIndex.cxx
110 AliTRDSimParam.cxx
111 AliTRDtrackGTU.cxx
112 AliTRDtrackerDebug.cxx
113 AliTRDtrackerV1.cxx
114 AliTRDtrackingChamber.cxx
115 AliTRDtrackingSector.cxx
116 AliTRDtrackletBase.cxx
117 AliTRDtrackletGTU.cxx
118 AliTRDtrackletOflHelper.cxx
119 AliTRDtrackletMCM.cxx
120 AliTRDtrackletWord.cxx
121 AliTRDtrackOnline.cxx
122 AliTRDtrackV1.cxx
123 AliTRDtransform.cxx
124 AliTRDtrapConfig.cxx
125 AliTRDtrapConfigHandler.cxx
126 AliTRDUshortInfo.cxx
127 )
128
129# Headers from sources
130string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
131
132# Generate the dictionary
133# It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
134get_directory_property(incdirs INCLUDE_DIRECTORIES)
135generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
136
137set(ROOT_DEPENDENCIES Core GenVector Geom Gpad Graf Gui Hist MathCore Matrix Minuit Net RIO Tree VMC XMLParser)
138set(ALIROOT_DEPENDENCIES STEERBase STEER ESD CDB RAWDatabase RAWDatarec)
139
140# Generate the ROOT map
141# Dependecies
142set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
143generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
144
145# Create an object to be reused in case of static libraries
146# Otherwise the sources will be compiled twice
147add_library(${MODULE}-object OBJECT ${SRCS} G__${MODULE}.cxx)
148# Follow headers dependencies
149add_dependencies(${MODULE}-object ${ALIROOT_DEPDENDENCIES})
150# Follow headers dependencies
151add_dependencies(${MODULE}-object ${ALIROOT_DEPDENDENCIES})
152# Add a library to the project using the object
153add_library(${MODULE} SHARED $<TARGET_OBJECTS:TRDbase-object>)
154
155# Linking
156target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
157
158# Public include folders that will be propagated to the dependecies
159target_include_directories(${MODULE} PUBLIC ${incdirs})
160
161# Additional compilation flags
68aeb13b 162set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS "")
139cbc46 163
164# System dependent: Modify the way the library is build
165if(${CMAKE_SYSTEM} MATCHES Darwin)
166 set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
167endif(${CMAKE_SYSTEM} MATCHES Darwin)
168
169# Check if CRS support was enabled
170if(TRD_RAW_CRC)
171 message(STATUS "CRC support for AliTRDrawStream enabled")
172 add_definitions(-DTRD_RAW_CRC)
173endif(TRD_RAW_CRC)
174
175# Check if RAW debug enabled
176if(TRD_RAW_DEBUG)
177 message(STATUS "Debug support for AliTRDrawStream enabled")
178 add_definitions(-DTRD_RAW_DEBUG)
179endif(TRD_RAW_DEBUG)
180
181
182# Installation
183install(TARGETS ${MODULE}
184 ARCHIVE DESTINATION lib
185 LIBRARY DESTINATION lib)
186
187install(FILES ${HDRS} DESTINATION include)
188
189# Static version if DA enabled
190if(ALIROOT_STATIC)
191 add_library(${MODULE}-static STATIC $<TARGET_OBJECTS:TRDbase-object>)
192 set_target_properties(${MODULE}-static PROPERTIES OUTPUT_NAME ${MODULE})
193
194 # list of shared dependencies / the name of the variable containing the list of static ones
195 generate_static_dependencies("${ALIROOT_DEPENDENCIES}" "STATIC_ALIROOT_DEPENDENCIES")
196 target_link_libraries(${MODULE}-static ${STATIC_ALIROOT_DEPENDENCIES} Root RootExtra)
197
198 # Public include folders that will be propagated to the dependecies
199 target_include_directories(${MODULE}-static PUBLIC ${incdirs})
200
201 set_target_properties(${MODULE}-static PROPERTIES LINK_FLAGS "-Wl,--whole-archive")
202
203 # Installation
204 install(TARGETS ${MODULE}-static
205 ARCHIVE DESTINATION lib
206 LIBRARY DESTINATION lib)
207endif(ALIROOT_STATIC)