]>
Commit | Line | Data |
---|---|---|
7d9133a4 | 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 PWGGAGammaConv) | |
18 | ||
19 | # Module include folder | |
20 | include_directories(${AliRoot_SOURCE_DIR}/PWGGA/GammaConv) | |
21 | ||
22 | # Additional include folders in 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}/EMCAL/EMCALUtils | |
27 | ${AliRoot_SOURCE_DIR}/EMCAL/EMCALbase | |
f1b16b21 | 28 | ${AliRoot_SOURCE_DIR}/PWGCF/FLOW/Tasks # what target here |
7d9133a4 | 29 | ${AliRoot_SOURCE_DIR}/PWG/EMCAL |
30 | ${AliRoot_SOURCE_DIR}/PWG/FLOW | |
31 | ${AliRoot_SOURCE_DIR}/PWG/TRD | |
32 | ${AliRoot_SOURCE_DIR}/STEER/AOD | |
33 | ${AliRoot_SOURCE_DIR}/STEER/ESD | |
34 | ${AliRoot_SOURCE_DIR}/STEER/STEERBase | |
35 | ) | |
36 | ||
37 | # Sources in alphabetical order | |
38 | set(SRCS | |
39 | AliAnaConvCorrBase.cxx | |
40 | AliAnaConvCorrPhoton.cxx | |
41 | AliAnaConvCorrPion.cxx | |
42 | AliAnaConvIsolation.cxx | |
43 | AliAnalysisTaskConversionQA.cxx | |
44 | AliAnalysisTaskdPhi.cxx | |
45 | AliAnalysisTaskEtaToPiPlPiMiGamma.cxx | |
46 | AliAnalysisTaskGammaCalo.cxx | |
47 | AliAnalysisTaskGammaConvCalo.cxx | |
48 | AliAnalysisTaskGammaConvDalitzV1.cxx | |
49 | AliAnalysisTaskGammaConvFlow.cxx | |
50 | AliAnalysisTaskGammaConvV1.cxx | |
51 | AliAnalysisTaskGCPartToPWG4Part.cxx | |
52 | AliAnalysisTaskMaterial.cxx | |
53 | AliAnalysisTaskNeutralMesonToPiPlPiMiPiZero.cxx | |
54 | AliAnalysisTaskPi0v2.cxx | |
55 | AliAnalysisTaskResolution.cxx | |
56 | AliAODConversionMother.cxx | |
57 | AliAODConversionParticle.cxx | |
58 | AliAODConversionPhoton.cxx | |
59 | AliCaloPhotonCuts.cxx | |
60 | AliConversionAODBGHandlerRP.cxx | |
61 | AliConversionCuts.cxx | |
62 | AliConversionMesonCuts.cxx | |
63 | AliConversionPhotonBase.cxx | |
64 | AliConversionPhotonCuts.cxx | |
65 | AliConversionSelection.cxx | |
66 | AliConversionTrackCuts.cxx | |
67 | AliConvEventCuts.cxx | |
68 | AliDalitzElectronCuts.cxx | |
69 | AliDalitzElectronSelector.cxx | |
70 | AliGammaConversionAODBGHandler.cxx | |
71 | AliKFConversionMother.cxx | |
72 | AliKFConversionPhoton.cxx | |
73 | AliPrimaryPionCuts.cxx | |
74 | AliPrimaryPionSelector.cxx | |
75 | AliV0ReaderV1.cxx | |
76 | ) | |
77 | ||
78 | # Headers from sources | |
79 | string(REPLACE ".cxx" ".h" HDRS "${SRCS}") | |
80 | ||
81 | # Generate the dictionary | |
82 | # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument | |
83 | get_directory_property(incdirs INCLUDE_DIRECTORIES) | |
84 | generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}") | |
85 | ||
86 | set(ROOT_DEPENDENCIES Core EG GenVector Geom Gpad Hist MathCore Matrix Net Physics RIO Tree) | |
87 | set(ALIROOT_DEPENDENCIES ANALYSIS ANALYSISalice AOD EMCALbase EMCALUtils ESD STEERBase PWGTRD PWGflowTasks) | |
88 | ||
89 | # Generate the ROOT map | |
90 | # Dependecies | |
91 | set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES}) | |
92 | generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h") | |
93 | ||
94 | # Create an object to be reused in case of static libraries | |
95 | # Otherwise the sources will be compiled twice | |
96 | add_library(${MODULE}-object OBJECT ${SRCS} G__${MODULE}.cxx) | |
97 | # Add a library to the project using the object | |
98 | add_library(${MODULE} SHARED $<TARGET_OBJECTS:${MODULE}-object>) | |
99 | target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES}) | |
100 | ||
101 | # Setting the correct headers for the object as gathered from the dependencies | |
102 | target_include_directories(${MODULE}-object PUBLIC $<TARGET_PROPERTY:${MODULE},INCLUDE_DIRECTORIES>) | |
103 | set_target_properties(${MODULE}-object PROPERTIES COMPILE_DEFINITIONS $<TARGET_PROPERTY:${MODULE},COMPILE_DEFINITIONS>) | |
104 | ||
105 | # Public include folders that will be propagated to the dependecies | |
106 | target_include_directories(${MODULE} PUBLIC ${incdirs}) | |
107 | ||
108 | set(MODULE_COMPILE_FLAGS) | |
109 | set(MODULE_LINK_FLAGS) | |
110 | ||
111 | if(DATE_FOUND) | |
112 | set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS}") | |
113 | set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${DATE_LIBS}") | |
114 | endif(DATE_FOUND) | |
115 | ||
116 | # Additional compilation and linking flags | |
117 | set(MODULE_COMPILE_FLAGS " ${MODULE_COMPILE_FLAGS}") | |
118 | ||
119 | # System dependent: Modify the way the library is build | |
120 | if(${CMAKE_SYSTEM} MATCHES Darwin) | |
121 | set(MODULE_LINK_FLAGS "-undefined dynamic_lookup ${MODULE_LINK_FLAGS}") | |
122 | endif(${CMAKE_SYSTEM} MATCHES Darwin) | |
123 | ||
124 | # Setting compilation flags for the object | |
125 | set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}") | |
126 | # Setting the linking flags for the library | |
127 | set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") | |
128 | ||
129 | # Installation | |
130 | install(TARGETS ${MODULE} | |
131 | ARCHIVE DESTINATION lib | |
132 | LIBRARY DESTINATION lib) | |
133 | ||
134 | install(FILES ${HDRS} DESTINATION include) |