-
-
Notifications
You must be signed in to change notification settings - Fork 21
/
meson.build
111 lines (100 loc) · 2.5 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
104
105
106
107
108
109
110
111
project(
'linux-enable-ir-emitter',
'cpp',
version: '6.0.6-dev',
license: 'MIT',
default_options: [
'cpp_std=c++20',
'buildtype=release',
'warning_level=everything',
],
)
# flag ajustement because of warning_level=everything
add_project_arguments(
# fix clang-tidy
'-Wno-unknown-warning-option',
# impossible to solve here
'-Wno-padded',
# without importance
'-Wno-shadow',
# unworth increase of reading complexity
'-Wno-abi-tag',
'-Wno-effc++',
'-Wno-suggest-attribute=pure',
# let the compiler tries
'-Wno-inline',
# raised by stl
'-Wno-alloc-zero',
'-Wno-strict-overflow',
# bugged
'-Wno-unused-const-variable',
'-Wno-suggest-attribute=const',
'-Wno-suggest-final-types',
'-Wno-suggest-final-methods',
language: 'cpp',
)
if get_option('prefer_static')
add_project_link_arguments(
'-static-libgcc',
'-static-libstdc++',
language: 'cpp',
)
endif
############
# Variable #
############
config_dir = get_option('sysconfdir') / meson.project_name()
log_dir = get_option('localstatedir') / 'log' / meson.project_name()
#####################
# Executable + Test #
#####################
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(),
)
###############
# Extra Tests #
###############
if get_option('tests')
subdir('tests')
endif