-
Notifications
You must be signed in to change notification settings - Fork 4
/
meson.build
103 lines (87 loc) · 2.59 KB
/
meson.build
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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
project('ex2_obc_sdr', 'c', 'cpp',
license: 'proprietary',
version: '0.5.0',
default_options : [
# 'c_args=pr', 'cpp_args=pr',
# 'c_std=c89', 'cpp_std=c++14',
# 'cpp_std=c++14',
# 'buildtype=release',
'warning_level=3',
'buildtype=debug',
# 'werror=true',
],
)
#add_project_arguments(
# language: 'c,cpp')
cpp = meson.get_compiler('cpp')
home = run_command('sh', '-c', 'echo $HOME')
HOME_DIR = home.stdout().strip()
message('home = ' + HOME_DIR)
prj_dir = run_command('sh', '-c', 'echo $PWD')
PRJ_DIR = prj_dir.stdout().strip()
message('prj_dir = ' + PRJ_DIR)
boost_dep = dependency('boost', modules: [
'program_options',
'iostreams',
'filesystem',
'system',
'thread'
],
)
eigen_dep = dependency('eigen3')
core_source_files = [
PRJ_DIR / 'lib/error_control/ConvolutionalCodecHD.cpp',
PRJ_DIR / 'lib/error_control/error_correction.cpp',
PRJ_DIR / 'lib/error_control/FEC.cpp',
PRJ_DIR / 'lib/error_control/golay.cpp',
PRJ_DIR / 'lib/error_control/NoFEC.cpp',
PRJ_DIR / 'lib/error_control/QCLDPC.cpp',
PRJ_DIR / 'lib/mac_layer/mac.cpp',
PRJ_DIR / 'lib/mac_layer/pdu/mpdu.cpp',
PRJ_DIR / 'lib/mac_layer/pdu/mpduHeader.cpp',
PRJ_DIR / 'lib/mac_layer/pdu/mpduUtility.cpp',
PRJ_DIR / 'lib/utilities/vectorTools.cpp',
PRJ_DIR / 'lib/wrapper/MACWrapper.cpp',
]
incdir = include_directories(
'include',
'include/configuration',
'include/error_control',
'include/mac_layer',
'include/mac_layer/pdu',
'include/math',
'include/pdu',
'include/utilities',
'include/wrapper',
'third_party/viterbi'
)
third_party_source_files = [
PRJ_DIR / 'third_party/viterbi/viterbi.cpp'
]
#executable('ex2_uhf_trx', 'src/ex2_uhf_trx.cpp', core_source_files,
# include_directories: incdir,
# dependencies: [boost_dep],
## link_with: ExSDRTxRxlib,
# install: true,
# )
gtest_dep = dependency('gtest_main', required: false)
if not gtest_dep.found()
foreach incdir: ['/usr/include/gtest', '/usr/local/include/gtest']
if cpp.has_header('gtest.h', args: '-I' + incdir)
gtest_inc = include_directories(incdir)
break
endif
endforeach
gtest_dep = declare_dependency(
dependencies: [cpp.find_library('gtest'),cpp.find_library('gtest_main')],
include_directories: gtest_inc,
)
endif
if not gtest_dep.found()
error('unable to find gtest dependency')
endif
#thread_dep = dependency('threads')
if gtest_dep.found()
subdir('unit_tests')
endif
#subdir('doc')