1 # **************************************************************************
2 # * Copyright(c) 1998-2014, ALICE Experiment at CERN, All rights reserved. *
4 # * Author: The ALICE Off-line Project. *
5 # * Contributors are mentioned in the code where appropriate. *
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 # **************************************************************************
17 set(MODULE PWGGAEMCALTasks)
19 # Module include folder
20 include_directories(${AliRoot_SOURCE_DIR}/PWGGA/EMCALTasks)
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}/OADB
31 ${AliRoot_SOURCE_DIR}/PWG/EMCAL
32 ${AliRoot_SOURCE_DIR}/PWGGA/PWGGAUtils
33 ${AliRoot_SOURCE_DIR}/STEER/AOD
34 ${AliRoot_SOURCE_DIR}/STEER/CDB
35 ${AliRoot_SOURCE_DIR}/STEER/ESD
36 ${AliRoot_SOURCE_DIR}/STEER/STEER
37 ${AliRoot_SOURCE_DIR}/STEER/STEERBase
40 # Sources in alphabetical order
42 AliAnalysisTaskEMCALClusterize.cxx
43 AliAnalysisTaskEMCALIsolation.cxx
44 AliAnalysisTaskEMCALIsoPhoton.cxx
45 AliAnalysisTaskEMCALMesonGGSDM.cxx
46 AliAnalysisTaskEMCALMesonGGSDMpPb.cxx
47 AliAnalysisTaskEMCALPhoton.cxx
48 AliAnalysisTaskEMCALPhotonIsolation.cxx
49 AliAnalysisTaskEMCALPi0CalibSelection.cxx
50 AliAnalysisTaskEMCALPi0PbPb.cxx
51 AliAnalysisTaskEMCALPi0V2ShSh.cxx
52 AliAnalysisTaskEMCALTriggerQA.cxx
53 AliAnalysisTaskESDfilterEMCALEventSelect.cxx
54 AliAnalysisTaskPi0V2.cxx
55 AliAnalysisTaskSATR.cxx
56 AliAnalysisTaskSDMGammaMC.cxx
57 AliAnalysisTaskTrgContam.cxx
58 AliEMCalpi0ClusterEvaluationTask.cxx
62 # Headers from sources
63 string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
65 # Generate the dictionary
66 # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
67 get_directory_property(incdirs INCLUDE_DIRECTORIES)
68 generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
70 set(ROOT_DEPENDENCIES Core EG Geom Gpad Hist MathCore Physics RIO Tree)
71 set(ALIROOT_DEPENDENCIES ANALYSIS ANALYSISalice AOD CDB PWGEMCAL EMCALbase EMCALrec EMCALUtils ESD ESDfilter PWGGAUtils STEER STEERBase)
73 # Generate the ROOT map
75 set(LIBDEPS ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
76 generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
78 # Create an object to be reused in case of static libraries
79 # Otherwise the sources will be compiled twice
80 add_library(${MODULE}-object OBJECT ${SRCS} G__${MODULE}.cxx)
81 # Add a library to the project using the object
82 add_library(${MODULE} SHARED $<TARGET_OBJECTS:${MODULE}-object>)
83 target_link_libraries(${MODULE} ${ALIROOT_DEPENDENCIES} ${ROOT_DEPENDENCIES})
85 # Setting the correct headers for the object as gathered from the dependencies
86 target_include_directories(${MODULE}-object PUBLIC $<TARGET_PROPERTY:${MODULE},INCLUDE_DIRECTORIES>)
87 set_target_properties(${MODULE}-object PROPERTIES COMPILE_DEFINITIONS $<TARGET_PROPERTY:${MODULE},COMPILE_DEFINITIONS>)
89 # Public include folders that will be propagated to the dependecies
90 target_include_directories(${MODULE} PUBLIC ${incdirs})
92 set(MODULE_COMPILE_FLAGS)
93 set(MODULE_LINK_FLAGS)
96 set(MODULE_COMPILE_FLAGS "${DATE_CFLAGS}")
97 set(MODULE_LINK_FLAGS "${DATE_LDFLAGS} ${DATE_LIBS}")
100 # Additional compilation and linking flags
101 set(MODULE_COMPILE_FLAGS " ${MODULE_COMPILE_FLAGS}")
103 # System dependent: Modify the way the library is build
104 if(${CMAKE_SYSTEM} MATCHES Darwin)
105 set(MODULE_LINK_FLAGS "-undefined dynamic_lookup ${MODULE_LINK_FLAGS}")
106 endif(${CMAKE_SYSTEM} MATCHES Darwin)
108 # Setting compilation flags for the object
109 set_target_properties(${MODULE}-object PROPERTIES COMPILE_FLAGS "${MODULE_COMPILE_FLAGS}")
110 # Setting the linking flags for the library
111 set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "${MODULE_LINK_FLAGS}")
114 install(TARGETS ${MODULE}
115 ARCHIVE DESTINATION lib
116 LIBRARY DESTINATION lib)
118 install(FILES ${HDRS} DESTINATION include)
121 install(DIRECTORY macros DESTINATION PWGGA/EMCALTasks)