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}/TPC/${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/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
31 ${CMAKE_BINARY_DIR}/version
34 # Sources in alphabetical order
45 AliTPCAltroMapping.cxx
46 AliTPCBoundaryVoltError.cxx
50 AliTPCCalibGlobalMisalignment.cxx
51 AliTPCCalibPedestal.cxx
53 AliTPCCalibRawBase.cxx
57 AliTPCCalibViewerGUI.cxx
58 AliTPCCalibViewerGUItime.cxx
63 AliTPCClusterParam.cxx
65 AliTPCComposedCorrection.cxx
67 AliTPCConfigParser.cxx
69 AliTPCCorrectionDrift.cxx
70 AliTPCCorrectionLookupTable.cxx
75 AliTPCExBEffective.cxx
76 AliTPCExBEffectiveSector.cxx
80 AliTPCFCVoltError3D.cxx
82 AliTPCInverseCorrection.cxx
88 AliTPCPointCorrection.cxx
89 AliTPCPreprocessor.cxx
90 AliTPCPreprocessorOnline.cxx
93 AliTPCQADataMakerRec.cxx
98 AliTPCROCVoltError3D.cxx
99 AliTPCSensorTempArray.cxx
101 AliTPCSpaceCharge3D.cxx
102 AliTPCSpaceCharge.cxx
106 AliXRDPROOFtoolkit.cxx
109 # Headers from sources
110 string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
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}")
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)
120 # Generate the ROOT map
122 set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
123 generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
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 # Follow headers dependencies
129 add_dependencies(${MODULE}-object ${ALIROOT_DEPENDENCIES})
130 # Add a library to the project using the object
131 add_library(${MODULE} SHARED $<TARGET_OBJECTS:TPCbase-object>)
134 target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
136 # Setting the correct headers for the object as gathered from the dependencies
137 target_include_directories(${MODULE}-object PUBLIC $<TARGET_PROPERTY:${MODULE},INCLUDE_DIRECTORIES>)
138 set_target_properties(${MODULE}-object PROPERTIES COMPILE_DEFINITIONS $<TARGET_PROPERTY:${MODULE},COMPILE_DEFINITIONS>)
140 # Public include folders that will be propagated to the dependecies
141 target_include_directories(${MODULE} PUBLIC ${incdirs})
143 # Additional compilation flags
144 set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS "")
146 # System dependent: Modify the way the library is build
147 if(${CMAKE_SYSTEM} MATCHES Darwin)
148 set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
149 endif(${CMAKE_SYSTEM} MATCHES Darwin)
152 install(TARGETS ${MODULE}
153 ARCHIVE DESTINATION lib
154 LIBRARY DESTINATION lib)
156 install(FILES ${HDRS} DESTINATION include)
158 # Static version if DA enabled
160 add_library(${MODULE}-static STATIC $<TARGET_OBJECTS:TPCbase-object>)
161 set_target_properties(${MODULE}-static PROPERTIES OUTPUT_NAME ${MODULE})
163 # list of shared dependencies / the name of the variable containing the list of static ones
164 generate_static_dependencies("${ALIROOT_DEPENDENCIES}" "STATIC_ALIROOT_DEPENDENCIES")
165 target_link_libraries(${MODULE}-static ${STATIC_ALIROOT_DEPENDENCIES} Root RootExtra)
167 # Public include folders that will be propagated to the dependecies
168 target_include_directories(${MODULE}-static PUBLIC ${incdirs})
170 set_target_properties(${MODULE}-static PROPERTIES LINK_FLAGS "-Wl,--whole-archive")
173 install(TARGETS ${MODULE}-static
174 ARCHIVE DESTINATION lib
175 LIBRARY DESTINATION lib)
176 endif(ALIROOT_STATIC)