-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmeson.build
63 lines (57 loc) · 1.61 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
project(
'rog-daemon', 'cpp',
default_options: 'cpp_std=c++20'
)
if get_option('profile')
add_project_arguments('-DROGD_BUILD_PROFILE', language: 'cpp')
endif
if get_option('fan_curve')
add_project_arguments('-DROGD_BUILD_FAN_CURVE', language: 'cpp')
endif
if get_option('mux')
add_project_arguments('-DROGD_BUILD_MUX', language: 'cpp')
endif
if get_option('panel_od')
add_project_arguments('-DROGD_BUILD_PANEL_OD', language: 'cpp')
endif
executable(
'rog-daemon',
files(
'src/main.cpp',
'src/sysfs.cpp',
'src/profile.cpp',
'src/fan_curve.cpp',
'src/mux.cpp',
'src/panel_od.cpp'
),
install: true,
install_dir: '/usr/bin'
)
executable(
'rog-cli',
files('src/cli.cpp'),
install: true,
install_dir: '/usr/bin'
)
install_data('scripts/rog-profile', install_dir: '/usr/bin', install_mode: 'rwxr-xr-x')
install_data('scripts/rog-fan-curve', install_dir: '/usr/bin', install_mode: 'rwxr-xr-x')
install_data('scripts/rog-mux', install_dir: '/usr/bin', install_mode: 'rwxr-xr-x')
install_data('scripts/rog-panel-od', install_dir: '/usr/bin', install_mode: 'rwxr-xr-x')
init = get_option('init')
if init == 'systemd'
install_data('scripts/systemd',
install_dir: '/usr/lib/systemd/system',
rename: 'rog-daemon.service'
)
elif init == 'openrc'
install_data('scripts/openrc',
install_dir: '/etc/init.d',
install_mode: 'rwxr-xr-x',
rename: 'rog-daemon'
)
elif init == 'dinit'
install_data('scripts/dinit',
install_dir: '/etc/dinit.d',
rename: 'rog-daemon'
)
endif