-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
56 lines (47 loc) · 1.58 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
#---------------------------------*-CMake-*----------------------------------#
# Copyright 2020-2022 UT-Battelle, LLC, and other Celeritas developers.
# See the Celeritas top-level COPYRIGHT file for details.
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
#----------------------------------------------------------------------------#
cmake_minimum_required(VERSION 3.9)
project(evd)
if(DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Build type" FORCE)
message(STATUS "Set default CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}")
endif()
#----------------------------------------------------------------------------#
# Find packages
find_package(ROOT REQUIRED Eve)
#----------------------------------------------------------------------------#
# Generate ROOT dictionary
include(${ROOT_USE_FILE})
root_generate_dictionary(RootInterface
${PROJECT_SOURCE_DIR}/src/RootData.hh
MODULE rootdata
LINKDEF ${PROJECT_SOURCE_DIR}/src/RootInterfaceLinkDef.hh
)
add_library(rootdata SHARED
${PROJECT_SOURCE_DIR}/src/RootData.hh RootInterface.cxx
)
target_link_libraries(rootdata PUBLIC ${ROOT_LIBRARIES})
#----------------------------------------------------------------------------#
# Add executable
add_executable(evd main.cc
src/MainViewer.cc
src/EventViewer.cc
src/MCTruthViewerInterface.cc
src/RootDataViewer.cc
src/RSWViewer.cc
)
target_include_directories(evd PRIVATE
$<BUILD_INTERFACE:
${CMAKE_CURRENT_SOURCE_DIR}/src
${ROOT_INCLUDE_DIR}>
)
target_link_libraries(evd PRIVATE
ROOT::Core
ROOT::Tree
ROOT::Eve
ROOT::Rint
rootdata
)