PWGCF/Correlations converted to native cmake
[u/mrichter/AliRoot.git] / PWGCF / Correlations / DPhi / CMakeLists.txt
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
17 set (MODULE PWGCFCorrelationsDPhi)
18
19 # Module include folder
20 include_directories(${AliRoot_SOURCE_DIR}/PWGCF/Correlations/DPhi)
21
22 # Additional includes - alphabetical order except ROOT
23 include_directories(${ROOT_INCLUDE_DIRS}
24                     ${AliRoot_SOURCE_DIR}/ANALYSIS/ANALYSIS
25                     ${AliRoot_SOURCE_DIR}/ANALYSIS/ANALYSISalice
26                     ${AliRoot_SOURCE_DIR}/ANALYSIS/ESDfilter
27                     ${AliRoot_SOURCE_DIR}/CORRFW
28                     ${AliRoot_SOURCE_DIR}/EVGEN
29                     ${AliRoot_SOURCE_DIR}/LHAPDF
30                     ${AliRoot_SOURCE_DIR}/PWG/muon
31                     ${AliRoot_SOURCE_DIR}/PWG/Tools
32                     ${AliRoot_SOURCE_DIR}/PWGCF/Correlations/Base
33                     ${AliRoot_SOURCE_DIR}/PWGLF/SPECTRA/PiKaPr/TestAOD
34                     ${AliRoot_SOURCE_DIR}/PYTHIA6/AliPythia6
35                     ${AliRoot_SOURCE_DIR}/PYTHIA8/AliPythia8
36                     ${AliRoot_SOURCE_DIR}/PYTHIA8/pythia8175/include
37                     ${AliRoot_SOURCE_DIR}/STEER/AOD
38                     ${AliRoot_SOURCE_DIR}/STEER/ESD
39                     ${AliRoot_SOURCE_DIR}/STEER/STEER
40                     ${AliRoot_SOURCE_DIR}/STEER/STEERBase
41   )
42
43 # Sources - alphabetical order
44 set(SRCS
45     AliAnalysisTask3PCorrelations.cxx.
46     AliAnalysisTaskContMC.cxx
47     AliAnalysisTaskDiHadron.cxx
48     AliAnalysisTaskDiJetCorrelations.cxx
49     AliAnalysisTaskDptDptCorrelations.cxx
50     AliAnalysisTaskDptDptQA.cxx
51     AliAnalysisTaskLeadingTrackUE.cxx.
52     AliAnalysisTaskLongRangeCorrelations.cxx.
53     AliAnalysisTaskMinijet.cxx
54     AliAnalysisTaskPhiCorrelations.cxx.
55     AliAnalysisTaskpxpx.cxx
56     AliAnalysisTaskpxpy.cxx
57     AliAnalysisTaskpxpy.cxx
58     AliAnalysisTaskpypy.cxx
59     AliAnalysisTaskpypy.cxx
60     AliAnalysisTaskPythiaMpi.cxx
61     AliAnalysisTaskpzpz.cxx
62     AliAnalysisTaskpzpz.cxx
63     AliAnalysisTaskTwoPlusOne.cxx.
64     AliDptDptInMC.cxx
65     AliLeadingV0Correlation.cxx.
66     AliPhiCorrelationsQATask.cxx.
67     DiHadronPID/AliAnalysisTaskCompareAODTrackCuts.cxx
68     DiHadronPID/AliAnalysisTaskDiHadronPID.cxx.
69     DiHadronPID/AliAODEventCutsDiHadronPID.cxx
70     DiHadronPID/AliAODTrackCutsDiHadronPID.cxx
71     DiHadronPID/AliFunctionsDiHadronPID.cxx
72     DiHadronPID/AliHistToolsDiHadronPID.cxx
73     DiHadronPID/AliTrackDiHadronPID.cxx
74     FourierDecomposition/AliDhcTask.cxx
75     FourierDecomposition/AliMCTruthCent.cxx
76     FourierDecomposition/AliMCTruthTrackMaker.cxx
77     FourierDecomposition/AliMuonEffMC.cxx
78     FourierDecomposition/AliPool.cxx
79     MuonHadron/AliAnalysisTaskDiMuonCorrelations.cxx
80     MuonHadron/AliAnalysisTaskMuonHadronCorrelations.cxx.
81     PhiEffMC/AliAnalysisTaskPhiEffMc.cxx
82     PidPid/AliAnalysisTaskPidPidCorrelations.cxx
83     TriggerPID/AliAnalysisTaskPIDCORR.cxx
84     TriggerPID/AliTwoParticlePIDCorr.cxx
85     TriggerPID/AliTwoParticlePIDCorrKine.cxx
86    )
87
88 # Headers from sources
89 string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
90
91 # Generate the dictionary
92 # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
93 get_directory_property(incdirs INCLUDE_DIRECTORIES)
94 generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
95
96 # Add a shared library
97 add_library(${MODULE} SHARED  ${SRCS} G__${MODULE}.cxx)
98
99 # Generate the ROOT map
100 # Dependecies
101 set(LIBDEPS AliPythia8 ANALYSISalice CORRFW PWGmuon PWGCFCorrelationsBase PWGLFspectra)
102 generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
103
104 # Linking the library
105 target_link_libraries(${MODULE} ${LIBDEPS})
106
107 # Public include folders that will be propagated to the dependecies
108 target_include_directories(${MODULE} PUBLIC ${incdirs})
109
110 # System dependent: Modify the way the library is build
111 if(${CMAKE_SYSTEM} MATCHES Darwin)
112     set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
113 endif(${CMAKE_SYSTEM} MATCHES Darwin)
114
115 # Installation
116 install(TARGETS ${MODULE} 
117   ARCHIVE DESTINATION lib
118   LIBRARY DESTINATION lib)
119 install(FILES ${HDRS} DESTINATION include)