1 | cmake_minimum_required(VERSION 2.8)
|
---|
2 |
|
---|
3 | project(Delphes)
|
---|
4 |
|
---|
5 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -DDROP_CGAL")
|
---|
6 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
|
---|
7 |
|
---|
8 | # Declare ROOT dependency
|
---|
9 | find_package(ROOT COMPONENTS EG Eve Geom Gui GuiHtml GenVector Hist Physics Matrix Graf RIO Tree Gpad RGL MathCore)
|
---|
10 | include(${ROOT_USE_FILE})
|
---|
11 |
|
---|
12 | if(NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
---|
13 | set(CMAKE_INSTALL_LIBDIR "lib")
|
---|
14 | endif()
|
---|
15 |
|
---|
16 | function(DELPHES_GENERATE_DICTIONARY dictionary)
|
---|
17 | if(${ROOT_VERSION} LESS 6.0)
|
---|
18 | ROOT_GENERATE_DICTIONARY(${dictionary} ${ARGN})
|
---|
19 | else()
|
---|
20 | ROOT_GENERATE_DICTIONARY(${dictionary} MODULE ${dictionary} ${ARGN})
|
---|
21 | endif()
|
---|
22 | endfunction()
|
---|
23 |
|
---|
24 | # Declare position of all other externals needed
|
---|
25 | set(DelphesExternals_INCLUDE_DIR ${CMAKE_SOURCE_DIR}/external)
|
---|
26 |
|
---|
27 | add_subdirectory(classes)
|
---|
28 | add_subdirectory(converters)
|
---|
29 | add_subdirectory(display)
|
---|
30 | add_subdirectory(examples)
|
---|
31 | add_subdirectory(external)
|
---|
32 | add_subdirectory(modules)
|
---|
33 | add_subdirectory(readers)
|
---|
34 | add_subdirectory(cards)
|
---|
35 |
|
---|
36 | add_library(Delphes SHARED
|
---|
37 | $<TARGET_OBJECTS:classes>
|
---|
38 | $<TARGET_OBJECTS:modules>
|
---|
39 | $<TARGET_OBJECTS:ExRootAnalysis>
|
---|
40 | $<TARGET_OBJECTS:fastjet>
|
---|
41 | $<TARGET_OBJECTS:tcl>
|
---|
42 | $<TARGET_OBJECTS:Hector>
|
---|
43 | $<TARGET_OBJECTS:PUPPI>
|
---|
44 | )
|
---|
45 |
|
---|
46 | add_library(DelphesDisplay SHARED
|
---|
47 | $<TARGET_OBJECTS:classes>
|
---|
48 | $<TARGET_OBJECTS:display>
|
---|
49 | $<TARGET_OBJECTS:modules>
|
---|
50 | $<TARGET_OBJECTS:ExRootAnalysis>
|
---|
51 | $<TARGET_OBJECTS:fastjet>
|
---|
52 | $<TARGET_OBJECTS:tcl>
|
---|
53 | $<TARGET_OBJECTS:Hector>
|
---|
54 | $<TARGET_OBJECTS:PUPPI>
|
---|
55 | )
|
---|
56 |
|
---|
57 | target_link_Libraries(Delphes ${ROOT_LIBRARIES} ${ROOT_COMPONENT_LIBRARIES})
|
---|
58 | target_link_Libraries(DelphesDisplay ${ROOT_LIBRARIES} ${ROOT_COMPONENT_LIBRARIES})
|
---|
59 |
|
---|
60 | install(TARGETS Delphes DelphesDisplay DESTINATION lib)
|
---|