forked from yanet-platform/yanet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
86 lines (66 loc) · 2.58 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
project('yanet', 'cpp',
meson_version: '>= 0.61',
default_options: ['cpp_std=c++17',
'buildtype=release',
'warning_level=2',
'werror=true',
'b_lto=true'])
yanet_rootdir = include_directories('.')
if get_option('buildtype').contains('release')
add_global_arguments('-Ofast', language: 'cpp')
endif
add_global_arguments('-DYANET_VERSION_MAJOR=' + get_option('version_major').to_string(), language: 'cpp')
add_global_arguments('-DYANET_VERSION_MINOR=' + get_option('version_minor').to_string(), language: 'cpp')
add_global_arguments('-DYANET_VERSION_REVISION=' + get_option('version_revision'), language: 'cpp')
add_global_arguments('-DYANET_VERSION_HASH=' + get_option('version_hash'), language: 'cpp')
add_global_arguments('-DYANET_VERSION_CUSTOM=' + get_option('version_custom'), language: 'cpp')
if get_option('target').contains('buildenv')
subdir('libprotobuf')
subdir('libfwparser')
subdir('parser')
subdir_done()
elif get_option('target').contains('unittest')
subdir('libfwparser')
subdir('dataplane/unittest')
subdir('controlplane/unittest')
subdir_done()
endif
archs = ['corei7']
yanet_configs = ['release']
if get_option('target').contains('autotest')
archs = ['corei7']
yanet_configs = ['autotest']
endif
if get_option('arch').length() > 0
archs = get_option('arch')
endif
if get_option('yanet_config').length() > 0
yanet_configs = get_option('yanet_config')
endif
subdir('libprotobuf')
subdir('libfwparser')
subdir('dataplane')
subdir('controlplane')
subdir('cli')
if get_option('target').contains('release')
subdir('logger')
subdir('librib')
install_data('yanet-init.sh',
rename: 'yanet-init',
install_dir: get_option('bindir'))
install_data('yanet-announcer.py',
rename: 'yanet-announcer',
install_dir: get_option('bindir'))
install_data('yanet-cli.bash_completion',
rename: 'yanet-cli',
install_dir: get_option('datadir') / 'bash-completion' / 'completions')
install_data('yanet-cli.zsh_completion',
rename: '_yanet-cli',
install_dir: get_option('datadir') / 'zsh' / 'functions' / 'Completion' / 'Unix')
install_data('yanet-wrapper', install_dir: get_option('bindir'))
install_data('yanet-rebind.sh',
rename: 'yanet-rebind',
install_dir: get_option('bindir'))
elif get_option('target').contains('autotest')
subdir('autotest')
endif