Switching from CMAKE_SOURCE_DIR to AliRoot_SOURCE_DIR
[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
234c484d 75# If ROOT was build with no AliEn support we disable the AliROOT AliEn support
76if(ROOT_HASALIEN STREQUAL "no")
77 message(STATUS "ROOT was build with no alien support. Disabling AliROOT AliEn support")
78else()
79 set(SRCS ${SRCS} AliAnalysisAlien.cxx)
80endif(ROOT_HASALIEN STREQUAL "no")
81
ff36895a 82# Headers from sources
83string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
84
85# Generate the dictionary
86# It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
87get_directory_property(incdirs INCLUDE_DIRECTORIES)
88generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
89
0224bae4 90# Generate the ROOT map
91# Dependecies
4d867e3f 92set(LIBDEPS ANALYSIS OADB AOD ESD STEERBase Net)
0224bae4 93generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
94
ff36895a 95# Add a library to the project using the specified source files
96add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx)
97
98# Additional compilation flags
99set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "-O -g")
100
101# System dependent: Modify the way the library is build
102if(${CMAKE_SYSTEM} MATCHES Darwin)
103 set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
104endif(${CMAKE_SYSTEM} MATCHES Darwin)
105
106# Installation
107install(TARGETS ${MODULE}
108 ARCHIVE DESTINATION lib
109 LIBRARY DESTINATION lib)
110install(FILES ${HDRS} DESTINATION include)