]>
Commit | Line | Data |
---|---|---|
73ba6874 | 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 TPCbase) | |
18 | ||
19 | # Module include folder | |
427d561c | 20 | include_directories(${AliRoot_SOURCE_DIR}/TPC/${MODULE}) |
73ba6874 | 21 | |
22 | # Additional include folders in alphabetical order except ROOT | |
23 | include_directories(${ROOT_INCLUDE_DIRS} | |
427d561c | 24 | ${AliRoot_SOURCE_DIR}/RAW/RAWDatabase |
25 | ${AliRoot_SOURCE_DIR}/RAW/RAWDatarec | |
26 | ${AliRoot_SOURCE_DIR}/RAW/dateStream | |
27 | ${AliRoot_SOURCE_DIR}/STEER/CDB | |
28 | ${AliRoot_SOURCE_DIR}/STEER/ESD | |
29 | ${AliRoot_SOURCE_DIR}/STEER/STEER | |
30 | ${AliRoot_SOURCE_DIR}/STEER/STEERBase | |
73ba6874 | 31 | ${CMAKE_BINARY_DIR}/version |
32 | ) | |
33 | ||
34 | # Sources in alphabetical order | |
35 | set(SRCS | |
f2bce741 | 36 | AliClusters.cxx |
37 | AliComplexCluster.cxx | |
73ba6874 | 38 | AliDetectorParam.cxx |
39 | AliDigitsArray.cxx | |
40 | AliDigits.cxx | |
41 | AliH2F.cxx | |
42 | AliSegmentArray.cxx | |
43 | AliSegmentID.cxx | |
44 | AliSimDigits.cxx | |
45 | AliTPCAltroMapping.cxx | |
46 | AliTPCBoundaryVoltError.cxx | |
47 | AliTPCCalibCE.cxx | |
48 | AliTPCcalibDB.cxx | |
49 | AliTPCcalibDButil.cxx | |
50 | AliTPCCalibGlobalMisalignment.cxx | |
51 | AliTPCCalibPedestal.cxx | |
52 | AliTPCCalibPulser.cxx | |
53 | AliTPCCalibRawBase.cxx | |
54 | AliTPCCalibRaw.cxx | |
55 | AliTPCCalibVdrift.cxx | |
56 | AliTPCCalibViewer.cxx | |
57 | AliTPCCalibViewerGUI.cxx | |
58 | AliTPCCalibViewerGUItime.cxx | |
59 | AliTPCCalPad.cxx | |
60 | AliTPCCalROC.cxx | |
f2bce741 | 61 | AliTPCclusterInfo.cxx |
62 | AliTPCclusterMI.cxx | |
63 | AliTPCClusterParam.cxx | |
64 | AliTPCClustersRow.cxx | |
73ba6874 | 65 | AliTPCComposedCorrection.cxx |
66 | AliTPCConfigDA.cxx | |
67 | AliTPCConfigParser.cxx | |
68 | AliTPCCorrection.cxx | |
69 | AliTPCCorrectionDrift.cxx | |
70 | AliTPCCorrectionLookupTable.cxx | |
71 | AliTPCdataQA.cxx | |
72 | AliTPCDigitsArray.cxx | |
73 | AliTPCExBBShape.cxx | |
74 | AliTPCExB.cxx | |
75 | AliTPCExBEffective.cxx | |
76 | AliTPCExBEffectiveSector.cxx | |
77 | AliTPCExBExact.cxx | |
78 | AliTPCExBFirst.cxx | |
79 | AliTPCExBTwist.cxx | |
80 | AliTPCFCVoltError3D.cxx | |
81 | AliTPCGGVoltError.cxx | |
82 | AliTPCInverseCorrection.cxx | |
83 | AliTPCLaserTrack.cxx | |
84 | AliTPCLoader.cxx | |
85 | AliTPCmapper.cxx | |
86 | AliTPCParam.cxx | |
87 | AliTPCParamSR.cxx | |
88 | AliTPCPointCorrection.cxx | |
89 | AliTPCPreprocessor.cxx | |
90 | AliTPCPreprocessorOnline.cxx | |
91 | AliTPCPRF2D.cxx | |
92 | AliTPCQAChecker.cxx | |
f2bce741 | 93 | AliTPCQADataMakerRec.cxx |
73ba6874 | 94 | AliTPCRawStreamV3.cxx |
f2bce741 | 95 | AliTPCRecoParam.cxx |
73ba6874 | 96 | AliTPCRF1D.cxx |
97 | AliTPCROC.cxx | |
98 | AliTPCROCVoltError3D.cxx | |
99 | AliTPCSensorTempArray.cxx | |
100 | AliTPCSensorTemp.cxx | |
101 | AliTPCSpaceCharge3D.cxx | |
102 | AliTPCSpaceCharge.cxx | |
103 | AliTPCTempMap.cxx | |
104 | AliTPCTransform.cxx | |
105 | AliTransform.cxx | |
106 | AliXRDPROOFtoolkit.cxx | |
107 | ) | |
108 | ||
109 | # Headers from sources | |
110 | string(REPLACE ".cxx" ".h" HDRS "${SRCS}") | |
111 | ||
112 | # Generate the dictionary | |
113 | # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument | |
114 | get_directory_property(incdirs INCLUDE_DIRECTORIES) | |
115 | generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}") | |
116 | ||
f2bce741 | 117 | set(ROOT_DEPENDENCIES Core EG GenVector Geom Gpad Graf Gui Hist MathCore Matrix Minuit Physics Proof RIO Spectrum Tree) |
118 | set(ALIROOT_DEPENDENCIES STEERBase STEER CDB ESD RAWDatabase RAWDatarec) | |
119 | ||
73ba6874 | 120 | # Generate the ROOT map |
121 | # Dependecies | |
f2bce741 | 122 | set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES}) |
73ba6874 | 123 | generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h") |
124 | ||
f2bce741 | 125 | # Create an object to be reused in case of static libraries |
126 | # Otherwise the sources will be compiled twice | |
127 | add_library(${MODULE}-object OBJECT ${SRCS} G__${MODULE}.cxx) | |
128 | # Add a library to the project using the object | |
129 | add_library(${MODULE} SHARED $<TARGET_OBJECTS:TPCbase-object>) | |
130 | ||
131 | # Linking | |
132 | target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES}) | |
73ba6874 | 133 | |
f2bce741 | 134 | # Public include folders that will be propagated to the dependecies |
135 | target_include_directories(${MODULE} PUBLIC ${incdirs}) | |
73ba6874 | 136 | |
137 | # Additional compilation flags | |
f2bce741 | 138 | set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS "-O -g") |
73ba6874 | 139 | |
140 | # System dependent: Modify the way the library is build | |
141 | if(${CMAKE_SYSTEM} MATCHES Darwin) | |
142 | set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") | |
143 | endif(${CMAKE_SYSTEM} MATCHES Darwin) | |
144 | ||
145 | # Installation | |
146 | install(TARGETS ${MODULE} | |
147 | ARCHIVE DESTINATION lib | |
148 | LIBRARY DESTINATION lib) | |
149 | ||
f2bce741 | 150 | install(FILES ${HDRS} DESTINATION include) |
151 | ||
152 | # Static version if DA enabled | |
153 | if(ALIROOT_STATIC) | |
154 | add_library(${MODULE}-static STATIC $<TARGET_OBJECTS:TPCbase-object>) | |
155 | set_target_properties(${MODULE}-static PROPERTIES OUTPUT_NAME ${MODULE}) | |
156 | ||
157 | # list of shared dependencies / the name of the variable containing the list of static ones | |
158 | generate_static_dependencies("${ALIROOT_DEPENDENCIES}" "STATIC_ALIROOT_DEPENDENCIES") | |
159 | target_link_libraries(${MODULE}-static ${STATIC_ALIROOT_DEPENDENCIES} Root RootExtra) | |
160 | ||
161 | # Public include folders that will be propagated to the dependecies | |
162 | target_include_directories(${MODULE}-static PUBLIC ${incdirs}) | |
163 | ||
164 | set_target_properties(${MODULE}-static PROPERTIES LINK_FLAGS "-Wl,--whole-archive") | |
165 | ||
166 | # Installation | |
167 | install(TARGETS ${MODULE}-static | |
168 | ARCHIVE DESTINATION lib | |
169 | LIBRARY DESTINATION lib) | |
170 | endif(ALIROOT_STATIC) |