forked from ibm-openbmc/ibm-panel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
90 lines (82 loc) · 2.07 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
project(
'ibm-panel',
'cpp',
default_options: [
'warning_level=3',
'werror=true',
'cpp_std=c++20',
# note: This is allowed in certain contexts, but provides binary size
# improvements for applications that don't require rtti
'cpp_rtti=false',
],
license: 'Apache-2.0',
version: '0.1',
)
systemd = dependency('systemd')
sdbusplus = dependency('sdbusplus')
cxx = meson.get_compiler('cpp')
add_project_arguments(
cxx.get_supported_arguments([
'-DBOOST_ASIO_USE_TS_EXECUTOR_AS_DEFAULT',
'-DBOOST_ASIO_DISABLE_THREADS',
'-DBOOST_NO_RTTI',
'-DBOOST_NO_TYPEID',
'-DBOOST_ALLOW_DEPRECATED_HEADERS'
]),
language : 'cpp')
add_global_arguments('-Wno-psabi', language : ['c', 'cpp'])
systemd_system_unit_dir = systemd.get_pkgconfig_variable(
'systemdsystemunitdir'
)
configure_file(input: 'com.ibm.panel.service',
output: 'com.ibm.panel.service',
install_dir: systemd_system_unit_dir,
copy: true,
install: true)
panel_app_a = static_library(
'ibm_panel_a',
'src/panel_app.cpp',
'src/panel_state_manager.cpp',
'src/i2c_message_encoder.cpp',
'src/button_handler.cpp',
'src/transport.cpp',
'src/utils.cpp',
'src/bus_monitor.cpp',
'src/executor.cpp',
include_directories: 'include'
)
executable(
'ibm-panel',
'src/panel_app_main.cpp',
dependencies: [
sdbusplus,
],
include_directories: 'include',
install: true,
link_with: [
panel_app_a,
],
)
if get_option('tests').enabled()
gtest = dependency('gtest', main: true)
gmock = dependency('gmock')
panel_app_test = executable(
'panel-app-test',
'test/panel_app_test.cpp',
'test/panel_state_manager_test.cpp',
'test/i2c_message_encoder_test.cpp',
dependencies: [
sdbusplus,
gmock,
gtest,
],
include_directories: [
'include',
],
link_with: [
panel_app_a,
],
cpp_args: ['-DStateManagerTest']
)
test('test_panel_app', panel_app_test)
endif