]>
Commit | Line | Data |
---|---|---|
b5576c4e | 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 AliHLTJET) | |
18 | ||
19 | # Module include folder | |
b5a0ad8b | 20 | include_directories(${AliRoot_SOURCE_DIR}/HLT/JET |
21 | ${AliRoot_SOURCE_DIR}/HLT/JET/analysis | |
22 | ${AliRoot_SOURCE_DIR}/HLT/JET/cone | |
23 | ${AliRoot_SOURCE_DIR}/HLT/JET/fastjet | |
b5576c4e | 24 | ) |
25 | ||
26 | # Additional include folders in alphabetical order except ROOT | |
27 | include_directories(${ROOT_INCLUDE_DIRS} | |
b5a0ad8b | 28 | ${AliRoot_SOURCE_DIR}/ANALYSIS/ANALYSISalice |
29 | ${AliRoot_SOURCE_DIR}/HLT/BASE | |
30 | ${AliRoot_SOURCE_DIR}/HLT/BASE/util | |
aff16a25 | 31 | ${AliRoot_SOURCE_DIR}/JETAN/JETAN |
b5a0ad8b | 32 | ${AliRoot_SOURCE_DIR}/STEER/AOD |
33 | ${AliRoot_SOURCE_DIR}/STEER/ESD | |
34 | ${AliRoot_SOURCE_DIR}/STEER/STEERBase | |
b5576c4e | 35 | ) |
36 | ||
37 | # Sources in alphabetical order | |
38 | set(SRCS | |
39 | AliHLTJETAgent.cxx | |
40 | AliHLTJETBase.cxx | |
41 | AliHLTJETJetCuts.cxx | |
42 | AliHLTJETReader.cxx | |
43 | AliHLTJETReaderHeader.cxx | |
44 | AliHLTJETTrackCuts.cxx | |
45 | analysis/AliHLTJETAnalysisBase.cxx | |
46 | analysis/AliHLTJETAnalysisComponent.cxx | |
47 | analysis/AliHLTJETAnalysisJets.cxx | |
48 | analysis/AliHLTJETAnalysisMerge.cxx | |
49 | cone/AliHLTJETConeEtaPhiCell.cxx | |
50 | cone/AliHLTJETConeFinder.cxx | |
51 | cone/AliHLTJETConeGrid.cxx | |
52 | cone/AliHLTJETConeHeader.cxx | |
53 | cone/AliHLTJETConeJetCandidate.cxx | |
54 | cone/AliHLTJETConeJetComponent.cxx | |
55 | cone/AliHLTJETConeSeedCuts.cxx | |
56 | ) | |
57 | ||
58 | # Headers from sources | |
59 | string(REPLACE ".cxx" ".h" HDRS "${SRCS}") | |
60 | ||
61 | # Check for FastJet installation to include proper headers | |
62 | if(FASTJET_FOUND) | |
63 | set(HDRS ${HDRS} | |
64 | fastjet/AliHLTJETFastJetHeader.h | |
65 | fastjet/AliHLTJETFastJetFinder.h | |
66 | fastjet/AliHLTJETFastJetComponent.h | |
67 | ) | |
68 | ||
69 | include_directories(${FASTJET_INCLUDE_DIR}) | |
aff16a25 | 70 | link_directories(${FASTJET_LIBS_DIR}) |
b5576c4e | 71 | add_definitions(${FASTJET_DEFINITIONS}) |
72 | endif(FASTJET_FOUND) | |
73 | ||
74 | # Generate the dictionary | |
75 | # It will create G_ARG1.cxx and G_ARG1.h / ARG1 = function first argument | |
76 | get_directory_property(incdirs INCLUDE_DIRECTORIES) | |
77 | generate_dictionary("${MODULE}" "${MODULE}LinkDef.h" "${HDRS}" "${incdirs}") | |
78 | ||
79 | # Generate the ROOT map | |
80 | # Dependecies | |
81 | set(LIBDEPS STEERBase AOD ESD ANALYSISalice HLTbase AliHLTUtil JETAN) | |
82 | generate_rootmap("${MODULE}" "${LIBDEPS}" "${CMAKE_CURRENT_SOURCE_DIR}/${MODULE}LinkDef.h") | |
83 | ||
84 | # Add a library to the project using the specified source files | |
85 | add_library(${MODULE} SHARED ${SRCS} G__${MODULE}.cxx) | |
86 | ||
87 | # Additional compilation flags | |
68aeb13b | 88 | set_target_properties(${MODULE} PROPERTIES COMPILE_FLAGS "") |
d2d8e21b | 89 | target_link_libraries(${MODULE} STEERBase AOD ESD ANALYSISalice HLTbase AliHLTUtil JETAN) |
90 | ||
91 | if(FASTJET_FOUND) | |
92 | target_link_libraries(${MODULE} ${FASTJET_LIBS}) | |
93 | endif(FASTJET_FOUND) | |
b5576c4e | 94 | |
95 | # System dependent: Modify the way the library is build | |
96 | if(${CMAKE_SYSTEM} MATCHES Darwin) | |
97 | set_target_properties(${MODULE} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") | |
98 | endif(${CMAKE_SYSTEM} MATCHES Darwin) | |
99 | ||
100 | # Installation | |
101 | install(TARGETS ${MODULE} | |
102 | ARCHIVE DESTINATION lib | |
103 | LIBRARY DESTINATION lib) | |
104 | ||
105 | install(FILES ${HDRS} DESTINATION include) |