]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/BASE/CMakeLists.txt
TRD DAs
[u/mrichter/AliRoot.git] / HLT / BASE / CMakeLists.txt
CommitLineData
8bb711ff 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
728a6467 16# HLTbase + subfolders (end of the cmake file)
f82bfa66 17# Subfolders have to be includes at the begining otherwise
b5a0ad8b 18# they will inherit properties from the parent
19add_subdirectory(HOMER)
7af7e653 20add_subdirectory(interface)
b5a0ad8b 21add_subdirectory(util)
728a6467 22
8bb711ff 23# Module
24set(MODULE HLTbase)
25
26# Module include folder
b5a0ad8b 27include_directories(${AliRoot_SOURCE_DIR}/HLT/BASE
8bb711ff 28 )
29
30# Additional include folders in alphabetical order except ROOT
27d54f3d 31include_directories(
7a78a624 32 ${AliRoot_SOURCE_DIR}/HLT/BASE/HOMER
b5a0ad8b 33 ${AliRoot_SOURCE_DIR}/RAW/RAWDatabase
27d54f3d 34 ${AliRoot_SOURCE_DIR}/STEER/STEERBase
8bb711ff 35 )
36
37# Sources in alphabetical order
38set(SRCS
39 AliHLTBlockDataCollection.cxx
40 AliHLTCalibrationProcessor.cxx
41 AliHLT_C_Component_WrapperInterface.cxx
42 AliHLT_C_Component_WrapperInterface.cxx
43 AliHLTComponentBenchmark.cxx
44 AliHLTComponentConfiguration.cxx
45 AliHLTComponent.cxx
46 AliHLTComponentHandler.cxx
47 AliHLTConfiguration.cxx
48 AliHLTConfigurationHandler.cxx
49 AliHLTConsumerDescriptor.cxx
50 AliHLTControlTask.cxx
51 AliHLTCTPData.cxx
52 AliHLTDAQ.cxx
53 AliHLTDataBuffer.cxx
54 AliHLTDataDeflater.cxx
55 AliHLTDataDeflaterHuffman.cxx
56 AliHLTDataDeflaterSimple.cxx
57 AliHLTDataInflater.cxx
58 AliHLTDataInflaterHuffman.cxx
59 AliHLTDataInflaterSimple.cxx
60 AliHLTDataSink.cxx
61 AliHLTDataSource.cxx
62 AliHLTDataTypes.cxx
63 AliHLTDataTypes.cxx
64 AliHLTDimServer.cxx
65 AliHLTDomainEntry.cxx
66 AliHLTDumpTask.cxx
67 AliHLTErrorGuard.cxx
68 AliHLTEsdManager.cxx
69 AliHLTEventStatistics.cxx
70 AliHLTGlobalTriggerDecision.cxx
71 AliHLTHOMERBlockDesc.cxx
72 AliHLTHOMERLibManager.cxx
73 AliHLTHOMERManager.cxx
74 AliHLTHOMERProxyHandler.cxx
75 AliHLTHOMERSourceDesc.cxx
76 AliHLTHuffman.cxx
77 AliHLTLogging.cxx
78 AliHLTMemoryFile.cxx
79 AliHLTMessage.cxx
80 AliHLTMisc.cxx
81 AliHLTModuleAgent.cxx
82 AliHLTModulePreprocessor.cxx
83 AliHLTOfflineDataSource.cxx
84 AliHLTOfflineInterface.cxx
85 AliHLTOnlineConfiguration.cxx
86 AliHLTOUT.cxx
27d54f3d 87 AliHLTOUTComponent.cxx
8bb711ff 88 AliHLTOUTHandlerChain.cxx
89 AliHLTOUTHandlerDetectorDDL.cxx
90 AliHLTOUTHandlerEquId.cxx
91 AliHLTOUTHandlerEsdBranch.cxx
92 AliHLTOUTHandler.cxx
93 AliHLTOUTHandlerIgnore.cxx
94 AliHLTOUTHomerBuffer.cxx
95 AliHLTOUTTask.cxx
96 AliHLTPluginBase.cxx
97 AliHLTProcessor.cxx
98 AliHLTReadoutList.cxx
99 AliHLTReconstructorBase.cxx
100 AliHLTRunStatistics.cxx
101 AliHLTScalars.cxx
102 AliHLTShuttleInterface.cxx
103 AliHLTSpacePointContainer.cxx
8bb711ff 104 AliHLTSystem.cxx
105 AliHLTTask.cxx
106 AliHLTTrackGeometry.cxx
107 AliHLTTriggerDecision.cxx
108 AliHLTTriggerDomain.cxx
109 AliHLTTriggerMenu.cxx
110 AliHLTTriggerMenuItem.cxx
111 AliHLTTriggerMenuSymbol.cxx
112 AliHLTTTreeProcessor.cxx
113 )
114
115# Headers from sources
116string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
117set(HDRS ${HDRS}
118 AliHLTCommonCDBEntries.h
119 AliHLTDefinitions.h
120 AliHLTExternalTrackParam.h
121 AliHLTLoggingVariadicFree.h
122 AliHLTStdIncludes.h
123 )
124
125# Generate the dictionary
126# It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
127get_directory_property(incdirs INCLUDE_DIRECTORIES)
128generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
129
7a78a624 130set(ROOT_DEPENDENCIES Core Geom Graf Hist MathCore Net RIO Tree XMLParser)
131set(ALIROOT_DEPENDENCIES STEERBase RAWDatabase AliHLTHOMER)
8bb711ff 132# Generate the ROOT map
133# Dependecies
7a78a624 134set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
8bb711ff 135generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
136
f82bfa66 137# Create an object to be reused in case of static libraries
138# Otherwise the sources will be compiled twice
7a78a624 139add_library(${MODULE}-object OBJECT ${SRCS} G__${MODULE}.cxx)
f82bfa66 140# Add a library to the project using the object
7a78a624 141add_library(${MODULE} SHARED $<TARGET_OBJECTS:HLTbase-object>)
142target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
8bb711ff 143
144# Additional compilation flags
f82bfa66 145set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS "-fPIC -O -g")
8bb711ff 146
147# System dependent: Modify the way the library is build
148if(${CMAKE_SYSTEM} MATCHES Darwin)
149 set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
150endif(${CMAKE_SYSTEM} MATCHES Darwin)
151
152# Installation
153install(TARGETS ${MODULE}
154 ARCHIVE DESTINATION lib
155 LIBRARY DESTINATION lib)
156
37883320 157install(FILES ${HDRS} DESTINATION include)
f82bfa66 158
159# Static version if DA enabled
160if(ALIROOT_STATIC)
161 add_library(${MODULE}-static STATIC $<TARGET_OBJECTS:HLTbase-object>)
162 set_target_properties(${MODULE}-static PROPERTIES OUTPUT_NAME ${MODULE})
163 target_link_libraries(${MODULE}-static STEERBase-static RAWDatabase-static AliHLTHOMER-static HLTbase-static Root RootExtra)
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)
170endif(ALIROOT_STATIC)