Split: fixed incpaths for ANALYSISalice -> OADB
[u/mrichter/AliRoot.git] / PWG / EMCAL / 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 PWGEMCAL)
18
19 # Module include folder
20 include_directories(${AliRoot_SOURCE_DIR}/PWG/EMCAL)
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}/TENDER/Tender
27                     ${AliRoot_SOURCE_DIR}/TENDER/TenderSupplies
28                     ${AliRoot_SOURCE_DIR}/EMCAL/EMCALbase
29                     ${AliRoot_SOURCE_DIR}/EMCAL/EMCALrec
30                     ${AliRoot_SOURCE_DIR}/EMCAL/EMCALUtils
31                     ${AliRoot_SOURCE_DIR}/OADB
32                     ${AliRoot_SOURCE_DIR}/PWG/Tools
33                     ${AliRoot_SOURCE_DIR}/STEER/AOD
34                     ${AliRoot_SOURCE_DIR}/STEER/CDB
35                     ${AliRoot_SOURCE_DIR}/STEER/ESD
36                     ${AliRoot_SOURCE_DIR}/STEER/STEERBase
37                     ${AliRoot_SOURCE_DIR}/STEER/STEER
38   )
39
40 # Sources - alphabetical order
41 set(SRCS
42   AliAnalysisTaskEMCALClusterizeFast.cxx
43   AliAnalysisTaskEmcal.cxx
44   AliAnalysisTaskEmcalSample.cxx
45   AliClusterContainer.cxx
46   AliEMCALClusterParams.cxx
47   AliEmcalAodTrackFilterTask.cxx
48   AliEmcalClusTrackMatcherTask.cxx
49   AliEmcalClusterMaker.cxx
50   AliEmcalCompatTask.cxx
51   AliEmcalContainer.cxx
52   AliEmcalDebugTask.cxx
53   AliEmcalEsdTrackFilterTask.cxx
54   AliEmcalMCTrackSelector.cxx
55   AliEmcalParticle.cxx
56   AliEmcalParticleMaker.cxx
57   AliEmcalPatchFromCellMaker.cxx
58   AliEmcalPhysicsSelection.cxx
59   AliEmcalPhysicsSelectionTask.cxx
60   AliEmcalPicoTrackMaker.cxx
61   AliEmcalSetupTask.cxx
62   AliEmcalTenderTask.cxx
63   AliEmcalTrackingQATask.cxx
64   AliEmcalTrackPropagatorTask.cxx
65   AliEmcalTriggerBitConfig.cxx
66   AliEmcalTriggerMaker.cxx
67   AliEmcalTriggerPatchInfo.cxx
68   AliEmcalTriggerSetupInfo.cxx
69   AliEsdSkimTask.cxx
70   AliEsdTrackExt.cxx
71   AliHadCorrTask.cxx
72   AliParticleContainer.cxx
73   AliPicoTrack.cxx
74   AliEMCALConfiguration.cxx
75   AliEMCALConfigHandler.cxx
76   AliEMCALConfigurationMatcher.cxx
77   AliEmcalTriggerDecision.cxx
78   AliEmcalTriggerDecisionContainer.cxx
79   AliEmcalTriggerSelectionCuts.cxx
80   AliEmcalTriggerSelection.cxx
81   AliAnalysisTaskEmcalTriggerSelection.cxx
82   )
83
84 # Headers from sources
85 string(REPLACE ".cxx" ".h" HDRS "${SRCS}")
86
87 # Generate the dictionary
88 # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument
89 get_directory_property(incdirs INCLUDE_DIRECTORIES)
90 generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}")
91
92 # Add a shared library
93 add_library(${MODULE} SHARED  ${SRCS} G__${MODULE}.cxx)
94
95 # Generate the ROOT map
96 # Dependecies
97 set(LIBDEPS ANALYSIS ANALYSISalice AOD CDB EMCALrec EMCALUtils ESD PWGTools STEER STEERBase Tender)
98 generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
99
100 # Linking the library
101 target_link_libraries(${MODULE} ${LIBDEPS})
102
103 # Public include folders that will be propagated to the dependecies
104 target_include_directories(${MODULE} PUBLIC ${incdirs})
105
106 # System dependent: Modify the way the library is build
107 if(${CMAKE_SYSTEM} MATCHES Darwin)
108     set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
109 endif(${CMAKE_SYSTEM} MATCHES Darwin)
110
111 # Installation
112 install(TARGETS ${MODULE} 
113   ARCHIVE DESTINATION lib
114   LIBRARY DESTINATION lib)
115 install(FILES ${HDRS} DESTINATION include)
116
117 # Installing the macros
118 install (DIRECTORY macros DESTINATION PWG/EMCAL)
119 install (DIRECTORY data DESTINATION PWG/EMCAL)