]>
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 PWGGAEMCALTasks) | |
18 | ||
19 | # Module include folder | |
20 | include_directories(${AliRoot_SOURCE_DIR}/PWGGA/EMCALTasks) | |
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}/ANALYSIS/ESDfilter | |
27 | ${AliRoot_SOURCE_DIR}/EMCAL/EMCALbase | |
28 | ${AliRoot_SOURCE_DIR}/EMCAL/EMCALrec | |
29 | ${AliRoot_SOURCE_DIR}/EMCAL/EMCALUtils | |
30 | ${AliRoot_SOURCE_DIR}/PWG/EMCAL | |
31 | ${AliRoot_SOURCE_DIR}/PWGGA/PWGGAUtils | |
32 | ${AliRoot_SOURCE_DIR}/STEER/AOD | |
33 | ${AliRoot_SOURCE_DIR}/STEER/CDB | |
34 | ${AliRoot_SOURCE_DIR}/STEER/ESD | |
35 | ${AliRoot_SOURCE_DIR}/STEER/STEER | |
36 | ${AliRoot_SOURCE_DIR}/STEER/STEERBase | |
37 | ) | |
38 | ||
39 | # Sources in alphabetical order | |
40 | set(SRCS | |
41 | AliAnalysisTaskEMCALClusterize.cxx | |
42 | AliAnalysisTaskEMCALIsolation.cxx | |
43 | AliAnalysisTaskEMCALIsoPhoton.cxx | |
44 | AliAnalysisTaskEMCALMesonGGSDM.cxx | |
45 | AliAnalysisTaskEMCALMesonGGSDMpPb.cxx | |
46 | AliAnalysisTaskEMCALPhoton.cxx | |
47 | AliAnalysisTaskEMCALPhotonIsolation.cxx | |
48 | AliAnalysisTaskEMCALPi0CalibSelection.cxx | |
49 | AliAnalysisTaskEMCALPi0PbPb.cxx | |
50 | AliAnalysisTaskEMCALPi0V2ShSh.cxx | |
51 | AliAnalysisTaskEMCALTriggerQA.cxx | |
52 | AliAnalysisTaskESDfilterEMCALEventSelect.cxx | |
53 | AliAnalysisTaskPi0V2.cxx | |
54 | AliAnalysisTaskSATR.cxx | |
55 | AliAnalysisTaskSDMGammaMC.cxx | |
56 | AliAnalysisTaskTrgContam.cxx | |
57 | AliEMCalpi0ClusterEvaluationTask.cxx | |
58 | AliStaObjects.cxx | |
59 | ) | |
60 | ||
61 | # Headers from sources | |
62 | string(REPLACE ".cxx" ".h" HDRS "${SRCS}") | |
63 | ||
64 | # Generate the dictionary | |
65 | # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument | |
66 | get_directory_property(incdirs INCLUDE_DIRECTORIES) | |
67 | generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}") | |
68 | ||
69 | set(ROOT_DEPENDENCIES Core EG Geom Gpad Hist MathCore Physics RIO Tree) | |
70 | set(ALIROOT_DEPENDENCIES ANALYSIS ANALYSISalice AOD CDB PWGEMCAL EMCALbase EMCALrec EMCALUtils ESD ESDfilter PWGGAUtils STEER STEERBase) | |
71 | ||
72 | # Generate the ROOT map | |
73 | # Dependecies | |
74 | set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES}) | |
75 | generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h") | |
76 | ||
77 | # Create an object to be reused in case of static libraries | |
78 | # Otherwise the sources will be compiled twice | |
79 | add_library(${MODULE}-object OBJECT ${SRCS} G__${MODULE}.cxx) | |
80 | # Add a library to the project using the object | |
81 | add_library(${MODULE} SHARED $<TARGET_OBJECTS:${MODULE}-object>) | |
82 | target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES}) | |
83 | ||
84 | # Setting the correct headers for the object as gathered from the dependencies | |
85 | target_include_directories(${MODULE}-object PUBLIC $<TARGET_PROPERTY:${MODULE},INCLUDE_DIRECTORIES>) | |
86 | set_target_properties(${MODULE}-object PROPERTIES COMPILE_DEFINITIONS $<TARGET_PROPERTY:${MODULE},COMPILE_DEFINITIONS>) | |
87 | ||
88 | # Public include folders that will be propagated to the dependecies | |
89 | target_include_directories(${MODULE} PUBLIC ${incdirs}) | |
90 | ||
91 | set(MODULE_COMPILE_FLAGS) | |
92 | set(MODULE_LINK_FLAGS) | |
93 | ||
94 | if(DATE_FOUND) | |
95 | set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS}") | |
96 | set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${DATE_LIBS}") | |
97 | endif(DATE_FOUND) | |
98 | ||
99 | # Additional compilation and linking flags | |
100 | set(MODULE_COMPILE_FLAGS " ${MODULE_COMPILE_FLAGS}") | |
101 | ||
102 | # System dependent: Modify the way the library is build | |
103 | if(${CMAKE_SYSTEM} MATCHES Darwin) | |
104 | set(MODULE_LINK_FLAGS "-undefined dynamic_lookup ${MODULE_LINK_FLAGS}") | |
105 | endif(${CMAKE_SYSTEM} MATCHES Darwin) | |
106 | ||
107 | # Setting compilation flags for the object | |
108 | set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}") | |
109 | # Setting the linking flags for the library | |
110 | set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}") | |
111 | ||
112 | # Installation | |
113 | install(TARGETS ${MODULE} | |
114 | ARCHIVE DESTINATION lib | |
115 | LIBRARY DESTINATION lib) | |
116 | ||
04484146 | 117 | install(FILES ${HDRS} DESTINATION include) |
118 | ||
119 | install (FILES macros/AddTaskEMCALTriggerQA.C | |
120 | DESTINATION PWGGA/EMCALTasks/macros/ ) |