libPWGEMCAL, libPWGflowtasks and libPWGmuon converted to native cmake
[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}/ANALYSIS/Tender
27                     ${AliRoot_SOURCE_DIR}/ANALYSIS/TenderSupplies
28                     ${AliRoot_SOURCE_DIR}/EMCAL/EMCALbase
29                     ${AliRoot_SOURCE_DIR}/EMCAL/EMCALrec
30                     ${AliRoot_SOURCE_DIR}/EMCAL/EMCALUtils
31                     ${AliRoot_SOURCE_DIR}/PWG/Tools
32                     ${AliRoot_SOURCE_DIR}/STEER/AOD
33                     ${AliRoot_SOURCE_DIR}/STEER/CDB
34                     ${AliRoot_SOURCE_DIR}/STEER/ESD
35                     ${AliRoot_SOURCE_DIR}/STEER/STEERBase
36                     ${AliRoot_SOURCE_DIR}/STEER/STEER
37   )
38
39 # Sources - alphabetical order
40 set(SRCS
41   AliAnalysisTaskEMCALClusterizeFast.cxx
42   AliAnalysisTaskEmcal.cxx
43   AliAnalysisTaskEmcalSample.cxx
44   AliClusterContainer.cxx
45   AliEMCALClusterParams.cxx
46   AliEmcalAodTrackFilterTask.cxx
47   AliEmcalClusTrackMatcherTask.cxx
48   AliEmcalClusterMaker.cxx
49   AliEmcalCompatTask.cxx
50   AliEmcalContainer.cxx
51   AliEmcalDebugTask.cxx
52   AliEmcalEsdTrackFilterTask.cxx
53   AliEmcalMCTrackSelector.cxx
54   AliEmcalParticle.cxx
55   AliEmcalParticleMaker.cxx
56   AliEmcalPatchFromCellMaker.cxx
57   AliEmcalPhysicsSelection.cxx
58   AliEmcalPhysicsSelectionTask.cxx
59   AliEmcalPicoTrackMaker.cxx
60   AliEmcalSetupTask.cxx
61   AliEmcalTenderTask.cxx
62   AliEmcalTrackingQATask.cxx
63   AliEmcalTrackPropagatorTask.cxx
64   AliEmcalTriggerBitConfig.cxx
65   AliEmcalTriggerMaker.cxx
66   AliEmcalTriggerPatchInfo.cxx
67   AliEmcalTriggerSetupInfo.cxx
68   AliEsdSkimTask.cxx
69   AliEsdTrackExt.cxx
70   AliHadCorrTask.cxx
71   AliParticleContainer.cxx
72   AliPicoTrack.cxx
73   AliEMCALConfiguration.cxx
74   AliEMCALConfigHandler.cxx
75   AliEMCALConfigurationMatcher.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 # Add a shared library
87 add_library(${MODULE} SHARED  ${SRCS} G__${MODULE}.cxx)
88
89 # Generate the ROOT map
90 # Dependecies
91 set(LIBDEPS ANALYSIS ANALYSISalice AOD CDB EMCALrec EMCALUtils ESD PWGTools STEER STEERBase Tender)
92 generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h")
93
94 # Linking the library
95 target_link_libraries(${MODULE} ${LIBDEPS})
96
97 # Public include folders that will be propagated to the dependecies
98 target_include_directories(${MODULE} PUBLIC ${incdirs})
99
100 # System dependent: Modify the way the library is build
101 if(${CMAKE_SYSTEM} MATCHES Darwin)
102     set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
103 endif(${CMAKE_SYSTEM} MATCHES Darwin)
104
105 # Installation
106 install(TARGETS ${MODULE} 
107   ARCHIVE DESTINATION lib
108   LIBRARY DESTINATION lib)
109 install(FILES ${HDRS} DESTINATION include)