Fixes for object target dependencies
[u/mrichter/AliRoot.git] / ANALYSIS / ANALYSISalice / CMakeLists.txt
CommitLineData
ff36895a 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 ANALYSISalice)
18
19# Module include folders in alphabetical order except ROOT
427d561c 20include_directories(${AliRoot_SOURCE_DIR}/ANALYSIS/${MODULE})
ff36895a 21
22# Additional include directories
23include_directories(${ROOT_INCLUDE_DIRS}
427d561c 24 ${AliRoot_SOURCE_DIR}/ANALYSIS/ANALYSIS
25 ${AliRoot_SOURCE_DIR}/OADB
26 ${AliRoot_SOURCE_DIR}/STEER/AOD
27 ${AliRoot_SOURCE_DIR}/STEER/ESD
28 ${AliRoot_SOURCE_DIR}/STEER/STEERBase
ff36895a 29 )
30
31# Sources in alphabetical order
32set(SRCS
ff36895a 33 AliAnalysisCuts.cxx
34 AliAnalysisFilter.cxx
35 AliAnalysisTaskBadChunkID.cxx
36 AliAnalysisTaskBaseLine.cxx
37 AliAnalysisTaskMCParticleFilter.cxx
38 AliAnalysisTaskME.cxx
39 AliAnalysisTaskPIDCombined.cxx
40 AliAnalysisTaskPIDqa.cxx
41 AliAnalysisTaskPIDResponse.cxx
42 AliAnalysisTaskSE.cxx
43 AliAnalysisTaskStat.cxx
44 AliAnalysisTaskTagCreator.cxx
45 AliAnalysisUtils.cxx
46 AliAODv0KineCuts.cxx
47 AliBackgroundSelection.cxx
48 AliCentralitySelectionTask.cxx
49 AliCollisionNormalization.cxx
50 AliCollisionNormalizationTask.cxx
51 AliEPSelectionTask.cxx
52 AliESDpidCuts.cxx
53 AliESDtrackCuts.cxx
54 AliESDv0Cuts.cxx
55 AliESDv0KineCuts.cxx
56 AliEventPoolLoop.cxx
57 AliEventPoolManager.cxx
58 AliEventPoolOTF.cxx
59 AliEventPoolSparse.cxx
60 AliHEPDataParser.cxx
61 AliKineTrackCuts.cxx
62 AliMultiEventInputHandler.cxx
63 AliMultiInputEventHandler.cxx
64 AliPhysicsSelection.cxx
65 AliPhysicsSelectionTask.cxx
66 AliPIDResponseInputHandler.cxx
67 AliPPVsMultUtils.cxx
68 AliTagAnalysis.cxx
69 AliTriggerAnalysis.cxx
70 AliUnfolding.cxx
71 AliVZEROEPSelectionTask.cxx
72 AliXMLCollection.cxx
73 )
74
4d31eb1c 75
76# If ROOT has no xml support desabling collections and AliEn support
77if(ROOT_HASXML)
78 set(SRCS ${SRCS}
79 AliTagAnalysis.cxx
80 AliXMLCollection.cxx
81 )
82
83 # If ROOT was build with no AliEn support we disable the AliROOT AliEn support
84 if(ROOT_HASALIEN)
85 set(SRCS ${SRCS}
86 AliAnalysisAlien.cxx
87 )
88 else()
89 message(STATUS "${MODULE} - ROOT was build with no alien support. Disabling AliROOT AliEn support")
90 endif()
234c484d 91else()
4d31eb1c 92 message(STATUS "${MODULE} - ROOT was build with no xml support. Disabling XML collection and AliEn support")
93endif()
234c484d 94
ff36895a 95# Headers from sources
96string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
97
98# Generate the dictionary
99# It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
100get_directory_property(incdirs INCLUDE_DIRECTORIES)
101generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
102
0224bae4 103# Generate the ROOT map
104# Dependecies
adf1619a 105set(LIBDEPS ANALYSIS OADB AOD ESD STEERBase Core EG Gpad Gui Hist MathCore Matrix Net Physics RIO TreePlayer Tree XMLIO)
0224bae4 106generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
107
ff36895a 108# Add a library to the project using the specified source files
109add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
adf1619a 110target_link_libraries(${MODULE} STEERBase OADB AOD ESD ANALYSIS Core EG Gpad Gui Hist MathCore Matrix Net Physics RIO TreePlayer Tree XMLIO)
ff36895a 111
112# Additional compilation flags
68aeb13b 113set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "")
ff36895a 114
115# System dependent: Modify the way the library is build
116if(${CMAKE_SYSTEM} MATCHES Darwin)
117 set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
118endif(${CMAKE_SYSTEM} MATCHES Darwin)
119
120# Installation
121install(TARGETS ${MODULE}
122 ARCHIVE DESTINATION lib
123 LIBRARY DESTINATION lib)
124install(FILES ${HDRS} DESTINATION include)