[7fe06d6] | 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
|
---|
[341c4db] | 9 | find_package(ROOT COMPONENTS EG Eve Geom Gui GuiHtml GenVector Hist Physics Matrix Graf RIO Tree Gpad RGL MathCore)
|
---|
[7fe06d6] | 10 | include(${ROOT_USE_FILE})
|
---|
| 11 |
|
---|
[be6c1c8] | 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 |
|
---|
[7fe06d6] | 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 |
|
---|
| 35 | add_library(Delphes SHARED
|
---|
| 36 | $<TARGET_OBJECTS:classes>
|
---|
| 37 | $<TARGET_OBJECTS:display>
|
---|
| 38 | $<TARGET_OBJECTS:modules>
|
---|
| 39 | $<TARGET_OBJECTS:ExRootAnalysis>
|
---|
| 40 | $<TARGET_OBJECTS:fastjet>
|
---|
| 41 | $<TARGET_OBJECTS:tcl>
|
---|
| 42 | $<TARGET_OBJECTS:Hector>
|
---|
| 43 | )
|
---|
| 44 |
|
---|
| 45 | target_link_Libraries(Delphes ${ROOT_LIBRARIES} ${ROOT_COMPONENT_LIBRARIES})
|
---|
| 46 |
|
---|
| 47 | install(TARGETS Delphes DESTINATION lib)
|
---|