-
-
Notifications
You must be signed in to change notification settings - Fork 20
/
meson.build
98 lines (87 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
87
88
89
90
91
92
93
94
95
96
97
98
project(
'linux-enable-ir-emitter',
'cpp',
version: '6.0.6',
license: 'MIT',
default_options: [
'cpp_std=c++20',
'buildtype=release',
'warning_level=everything',
'werror=true',
],
)
# flag ajustement because of warning_level=everything
add_project_arguments(
'-Wno-unknown-warning-option', # fix clang-tidy
'-Wno-padded', # impossible to solve here
'-Wno-shadow', # without importance
'-Wno-abi-tag', # unworth increase of reading complexity
'-Wno-effc++', # unworth increase of reading complexity
'-Wno-unused-const-variable', # bugged
'-Wno-suggest-attribute=const', # bugged
'-Wno-inline', # let the compiler tries
'-Wno-suggest-attribute=pure', # unworth increase of reading complexity
'-Wno-suggest-final-types', # bugged
'-Wno-suggest-final-methods', # bugged
language: 'cpp',
)
##############
# Dependency #
##############
opencv_dep = dependency('opencv4', include_type: 'system')
gtk_dep = dependency('gtk+-3.0', static: false)
yaml_dep = dependency('yaml-cpp', include_type: 'system')
argparse_dep = dependency('argparse', include_type: 'system')
spdlog_dep = dependency('spdlog', include_type: 'system')
############
# Variable #
############
config_dir = get_option('sysconfdir') / meson.project_name()
log_dir = get_option('localstatedir') / 'log' / meson.project_name()
##############
# Executable #
##############
subdir('src')
################
# Config + Log #
################
install_emptydir(config_dir)
install_emptydir(log_dir)
####################
# Shell completion #
####################
install_data(
'autocomplete/linux-enable-ir-emitter.bash',
rename: 'linux-enable-ir-emitter',
install_dir: get_option('datadir') / 'bash-completion/completions',
)
install_data(
'autocomplete/linux-enable-ir-emitter.zsh',
rename: '_linux-enable-ir-emitter',
install_dir: get_option('datadir') / 'zsh/site-functions',
)
################
# Boot service #
################
if get_option('boot_service') == 'systemd'
install_data(
'boot_service/systemd/linux-enable-ir-emitter.service',
install_dir: get_option('sysconfdir') / 'systemd/system',
)
elif get_option('boot_service') == 'openrc'
install_data(
'boot_service/openrc/linux-enable-ir-emitter',
install_dir: get_option('sysconfdir') / 'init.d',
)
endif
##########
# Others #
##########
install_data(
'README.md',
install_dir: get_option('datadir') / 'doc' / meson.project_name(),
)
install_data(
'LICENSE',
install_dir: get_option('datadir') / 'doc' / meson.project_name(),
)