This repository has been archived by the owner on May 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
57 lines (41 loc) · 1.95 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Set the minimum version of CMake that's required
cmake_minimum_required(VERSION 3.12)
# Set the project name
project(Ecal VERSION 2.1.0
DESCRIPTION "Module for all things ECal."
LANGUAGES CXX
)
# Search and configure ROOT
find_package(ROOT CONFIG REQUIRED)
option(BUILD_EVENT_ONLY "Build the event library." ON)
if(BUILD_EVENT_ONLY)
register_event_object( module_path "Ecal/Event" namespace "ldmx" class "ClusterAlgoResult" )
register_event_object( module_path "Ecal/Event" namespace "ldmx" class "EcalVetoResult" )
register_event_object( module_path "Ecal/Event" namespace "ldmx" class "EcalDigiCollection" )
register_event_object( module_path "Ecal/Event" namespace "ldmx" class "EcalCluster" type "collection" )
register_event_object( module_path "Ecal/Event" namespace "ldmx" class "EcalHit" type "collection" )
# Generate the files needed to build the event classes.
setup_library(module Ecal
name Event
dependencies ROOT::Core
Recon::Event SimCore::Event
register_target)
return()
endif()
# Search for the ONNXRuntime binaries. If not found, download the binaries
# to an external folder and create the targets.
find_package(ONNXRuntime 1.2.0)
setup_library(module Ecal
dependencies ROOT::Physics
Framework::Framework Recon::Event Tools::Tools DetDescr::DetDescr
ONNXRuntime::Interface
)
setup_test(dependencies Ecal::Ecal)
setup_python(package_name ${PYTHON_PACKAGE_NAME}/Ecal)
setup_data(module Ecal)
# Add the printing executable
add_executable(print-ecal-hex-readout ${PROJECT_SOURCE_DIR}/src/Ecal/print_ecal_hex_readout.cxx)
# Link to the Framework library
target_link_libraries(print-ecal-hex-readout PRIVATE DetDescr Ecal)
# Install the fire executable
install(TARGETS print-ecal-hex-readout DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)