1 # **************************************************************************
2 # * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
4 # * Author: The ALICE Off-line Project. *
5 # * Contributors are mentioned in the code where appropriate. *
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 # **************************************************************************
19 # Module include folder
20 include_directories(${AliRoot_SOURCE_DIR}/ITS/${MODULE})
22 # Additional include folders in alphabetical order except ROOT
23 include_directories(${ROOT_INCLUDE_DIRS}
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
34 # Sources in alphabetical order
36 AliITSBadChannelsSSD.cxx
37 AliITSBadChannelsSSDv2.cxx
39 AliITSCalibrationSDD.cxx
40 AliITSCalibrationSPD.cxx
41 AliITSCalibrationSSD.cxx
42 AliITSChannelDaSSD.cxx
43 AliITSChannelStatus.cxx
44 AliITSClusterFinder.cxx
45 AliITSClusterFinderSDDfast.cxx
46 AliITSClusterFinderV2SDD.cxx
47 AliITSClusterFinderV2SPD.cxx
48 AliITSClusterFinderV2SSD.cxx
49 AliITSClusterParam.cxx
50 AliITSclusterTable.cxx
52 AliITSCompressRawDataSDD.cxx
53 AliITSCorrMap1DSDD.cxx
54 AliITSCorrMap2DSDD.cxx
56 AliITSDCSAnalyzerSDD.cxx
58 AliITSDDLModuleMapSDD.cxx
66 AliITSDriftSpeedArraySDD.cxx
67 AliITSDriftSpeedSDD.cxx
69 AliITSFOSignalsSPD.cxx
76 AliITSInitGeometry.cxx
86 AliITSMultReconstructor.cxx
90 AliITSPedestalSSDv2.cxx
98 AliITSQADataMakerRec.cxx
99 AliITSQASDDChecker.cxx
100 AliITSQASPDChecker.cxx
101 AliITSQASSDChecker.cxx
102 AliITSQASDDDataMakerRec.cxx
103 AliITSQASPDDataMakerRec.cxx
104 AliITSQASSDDataMakerRec.cxx
106 AliITSRawStreamSDDCompressed.cxx
107 AliITSRawStreamSDD.cxx
108 AliITSRawStreamSPD.cxx
109 AliITSRawStreamSPDErrorLog.cxx
110 AliITSRawStreamSSD.cxx
111 AliITSRawStreamSSDv1.cxx
112 AliITSReconstructor.cxx
115 AliITSRecPointContainer.cxx
117 AliITSresponseSDD.cxx
118 AliITSresponseSPD.cxx
119 AliITSsegmentation.cxx
120 AliITSsegmentationSDD.cxx
121 AliITSsegmentationSPD.cxx
122 AliITSsegmentationSSD.cxx
124 AliITSSurveyToAlign.cxx
127 AliITSTracklPairs.cxx
132 AliITSTrackleterSPDEff.cxx
133 AliITSTransientDigit.cxx
134 AliITSTriggerAlgorithmConditions.cxx
135 AliITSTriggerConditions.cxx
139 AliITSVertexerCosmics.cxx
140 AliITSVertexerFast.cxx
141 AliITSVertexerFixed.cxx
147 set (SRCS ${SRCS} "AliITSHandleDaSSD.cxx")
148 # set the definitions per folder to be passed to ROOT
149 add_definitions(-DALI_DATE)
152 # Headers from sources
153 string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
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)
158 generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
160 # Setting the dependencies
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)
164 # Generate the ROOT map
166 set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
167 generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
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
173 add_library(${MODULE} SHARED $<TARGET_OBJECTS:ITSbase-object>)
174 target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
176 # Public include folders that will be propagated to the dependecies
177 target_include_directories(${MODULE} PUBLIC ${incdirs})
179 set(MODULE_COMPILE_FLAGS "-O -g -fPIC")
181 set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS} ${MODULE_COMPILE_FLAGS}")
184 # Additional compilation flags
185 set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}")
187 # System dependent: Modify the way the library is build
188 if(${CMAKE_SYSTEM} MATCHES Darwin)
189 set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
190 endif(${CMAKE_SYSTEM} MATCHES Darwin)
193 install(TARGETS ${MODULE}
194 ARCHIVE DESTINATION lib
195 LIBRARY DESTINATION lib)
197 install(FILES ${HDRS} DESTINATION include)
199 # Static version if DA enabled
201 add_library(${MODULE}-static STATIC $<TARGET_OBJECTS:ITSbase-object>)
202 set_target_properties(${MODULE}-static PROPERTIES OUTPUT_NAME ${MODULE})
204 # list of shared dependencies / the name of the variable containing the list of static ones
205 generate_static_dependencies("${ALIROOT_DEPENDENCIES}" "STATIC_ALIROOT_DEPENDENCIES")
206 target_link_libraries(${MODULE}-static ${STATIC_ALIROOT_DEPENDENCIES} Root)
208 # Public include folders that will be propagated to the dependecies
209 target_include_directories(${MODULE}-static PUBLIC ${incdirs})
211 set_target_properties(${MODULE}-static PROPERTIES LINK_FLAGS "-Wl,--whole-archive")
214 install(TARGETS ${MODULE}-static
215 ARCHIVE DESTINATION lib
216 LIBRARY DESTINATION lib)
217 endif(ALIROOT_STATIC)