-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmeson.build
More file actions
86 lines (74 loc) · 2.8 KB
/
meson.build
File metadata and controls
86 lines (74 loc) · 2.8 KB
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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
project('e2sar-utils', 'cpp',
version : files('VERSION.txt'),
default_options : [
'warning_level=3',
'cpp_std=c++17',
'buildtype=debugoptimized'
]
)
# C++ compiler
cxx = meson.get_compiler('cpp')
# Compile-time dependencies
# Boost dependencies: program_options used by root-reader, others required by e2sar
# Note: Boost doesn't provide .pc files, so we must declare them explicitly even though
# e2sar.pc lists them in Requires (which pkg-config cannot resolve for Boost)
boost_program_options_dep = dependency('boost', modules: ['program_options'], version : '>=1.89.0')
boost_log_dep = dependency('boost', modules: ['log'], version : '>=1.89.0')
boost_url_dep = dependency('boost', modules: ['url'], version : '>=1.89.0')
boost_thread_dep = dependency('boost', modules: ['thread'], version : '>=1.89.0')
boost_chrono_dep = dependency('boost', modules: ['chrono'], version : '>=1.89.0')
boost_filesystem_dep = dependency('boost', modules: ['filesystem'], version : '>=1.89.0')
threads_dep = dependency('threads')
# Runtime dependencies
grpc_dep = dependency('grpc++', version : '>=1.74.1', required : true)
protobuf_dep = dependency('protobuf', required : true)
# ROOT dependency for particle physics data
root_dep = dependency('ROOT',
method: 'pkg-config',
required: false,
components: ['Core', 'RIO', 'Tree'])
if not root_dep.found()
# Fallback to root-config
root_config = find_program('root-config', required: true)
root_cflags = run_command(root_config, '--cflags', check: true).stdout().strip()
root_libs = run_command(root_config, '--libs', check: true).stdout().strip()
root_dep = declare_dependency(
compile_args: root_cflags.split(),
link_args: root_libs.split()
)
endif
# E2SAR dependency - EJFAT Event Segmentation And Reassembly
# The e2sar.pc now has Boost linker flags in Libs.private and grpc++/protobuf in Requires
# We still need to declare Boost modules explicitly for header paths (Boost has no .pc files)
e2sar_dep = dependency('e2sar', method: 'pkg-config', required: true)
# Collect all dependencies
# Note: Boost modules declared for headers (no .pc files), linker flags come from e2sar.pc
project_deps = [
boost_program_options_dep,
boost_log_dep,
boost_url_dep,
boost_thread_dep,
boost_chrono_dep,
boost_filesystem_dep,
threads_dep,
root_dep,
e2sar_dep
]
# Include directories
inc_dir = include_directories('include')
# Subdirectories
subdir('include')
subdir('src')
subdir('bin')
subdir('tests')
# Summary
summary({
'prefix': get_option('prefix'),
'bindir': get_option('bindir'),
'libdir': get_option('libdir'),
'datadir': get_option('datadir'),
}, section: 'Directories')
summary({
'Build type': get_option('buildtype'),
'C++ standard': get_option('cpp_std'),
}, section: 'Configuration')