-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
70 lines (58 loc) · 3.07 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
58
59
60
61
62
63
64
65
66
67
68
69
70
# CMakeLists.txt for event package. It creates a library with dictionary and a main program
cmake_minimum_required(VERSION 3.0 FATAL_ERROR)
project(GETDecoder)
# You need to tell CMake where to find the ROOT installation. This can be done in a number of ways:
# - ROOT built with classic configure/make use the provided $ROOTSYS/etc/cmake/FindROOT.cmake
# - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix for ROOT
list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
#---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
find_package(ROOT REQUIRED COMPONENTS Core RIO Net Hist Graf Graf3d Gpad Tree Rint Postscript Matrix Physics MathCore Thread)
#---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
include(${ROOT_USE_FILE})
include_directories(
${ROOT_INCLUDE_DIRS}
${CMAKE_SOURCE_DIR}/source/FRIBDAQFormat
${CMAKE_SOURCE_DIR}/source/GETCore
${CMAKE_SOURCE_DIR}/source/GETFormat
${CMAKE_SOURCE_DIR}/source/GETUtil
)
add_definitions(${ROOT_CXX_FLAGS})
ROOT_GENERATE_DICTIONARY(G__GETDecoder
${CMAKE_SOURCE_DIR}/source/FRIBDAQFormat/RingItemHeader.hh
${CMAKE_SOURCE_DIR}/source/FRIBDAQFormat/RingItemBodyHeader.hh
${CMAKE_SOURCE_DIR}/source/FRIBDAQFormat/RingStateChangeItem.hh
${CMAKE_SOURCE_DIR}/source/FRIBDAQFormat/RingPhysicsEventItem.hh
${CMAKE_SOURCE_DIR}/source/GETFormat/GETBasicFrame.hh
${CMAKE_SOURCE_DIR}/source/GETFormat/GETBasicFrameHeader.hh
${CMAKE_SOURCE_DIR}/source/GETFormat/GETCoboFrame.hh
${CMAKE_SOURCE_DIR}/source/GETFormat/GETHeaderBase.hh
${CMAKE_SOURCE_DIR}/source/GETFormat/GETLayerHeader.hh
${CMAKE_SOURCE_DIR}/source/GETFormat/GETLayeredFrame.hh
${CMAKE_SOURCE_DIR}/source/GETFormat/GETTopologyFrame.hh
${CMAKE_SOURCE_DIR}/source/GETFormat/GETMutantFrame.hh
${CMAKE_SOURCE_DIR}/source/GETUtil/GETFileChecker.hh
${CMAKE_SOURCE_DIR}/source/GETUtil/GETMath.hh
${CMAKE_SOURCE_DIR}/source/GETCore/GETDecoder.hh
${CMAKE_SOURCE_DIR}/source/GETCore/GETFrameInfo.hh
LINKDEF ${CMAKE_SOURCE_DIR}/source/libGETDecoderLinkDef.h)
#---Create a shared library with geneated dictionary
add_library(GETDecoder SHARED
${CMAKE_SOURCE_DIR}/source/FRIBDAQFormat/RingItemHeader.cc
${CMAKE_SOURCE_DIR}/source/FRIBDAQFormat/RingItemBodyHeader.cc
${CMAKE_SOURCE_DIR}/source/FRIBDAQFormat/RingStateChangeItem.cc
${CMAKE_SOURCE_DIR}/source/FRIBDAQFormat/RingPhysicsEventItem.cc
${CMAKE_SOURCE_DIR}/source/GETFormat/GETBasicFrame.cc
${CMAKE_SOURCE_DIR}/source/GETFormat/GETBasicFrameHeader.cc
${CMAKE_SOURCE_DIR}/source/GETFormat/GETCoboFrame.cc
${CMAKE_SOURCE_DIR}/source/GETFormat/GETHeaderBase.cc
${CMAKE_SOURCE_DIR}/source/GETFormat/GETLayerHeader.cc
${CMAKE_SOURCE_DIR}/source/GETFormat/GETLayeredFrame.cc
${CMAKE_SOURCE_DIR}/source/GETFormat/GETTopologyFrame.cc
${CMAKE_SOURCE_DIR}/source/GETFormat/GETMutantFrame.cc
${CMAKE_SOURCE_DIR}/source/GETUtil/GETFileChecker.cc
${CMAKE_SOURCE_DIR}/source/GETUtil/GETMath.cc
${CMAKE_SOURCE_DIR}/source/GETCore/GETDecoder.cc
${CMAKE_SOURCE_DIR}/source/GETCore/GETFrameInfo.cc
G__GETDecoder.cxx
)
target_link_libraries(GETDecoder ${ROOT_LIBRARIES})