-
Notifications
You must be signed in to change notification settings - Fork 49
/
meson.build
101 lines (87 loc) · 2.81 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
project(
'phosphor-networkd',
'cpp',
version: '0.1',
meson_version: '>=1.1.1',
default_options: [
'warning_level=3',
'cpp_std=c++23',
])
default_busname = 'xyz.openbmc_project.Network'
conf_data = configuration_data()
conf_data.set_quoted('DEFAULT_BUSNAME', default_busname)
conf_data.set('HAVE_UBOOT_ENV', get_option('uboot-env'))
conf_data.set(
'LINK_LOCAL_AUTOCONFIGURATION',
get_option('default-link-local-autoconf'))
conf_data.set(
'ENABLE_IPV6_ACCEPT_RA',
get_option('default-ipv6-accept-ra'))
conf_data.set('SYNC_MAC_FROM_INVENTORY', get_option('sync-mac'))
conf_data.set('PERSIST_MAC', get_option('persist-mac'))
conf_data.set10('FORCE_SYNC_MAC_FROM_INVENTORY', get_option('force-sync-mac'))
sdbusplus_dep = dependency('sdbusplus')
sdbusplusplus_prog = find_program('sdbus++', native: true)
sdbuspp_gen_meson_prog = find_program('sdbus++-gen-meson', native: true)
sdbusplusplus_depfiles = files()
if sdbusplus_dep.type_name() == 'internal'
sdbusplusplus_depfiles = subproject('sdbusplus').get_variable('sdbusplusplus_depfiles')
endif
generated_sources = []
generated_others = []
yaml_sources = []
subdir('gen')
subdir('gen/xyz')
networkd_dbus_includes = include_directories('gen')
phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces')
networkd_dbus_deps = [
phosphor_dbus_interfaces_dep,
sdbusplus_dep,
]
networkd_dbus_lib = static_library(
'networkd_dbus',
generated_sources,
implicit_include_directories: false,
include_directories: networkd_dbus_includes,
dependencies: networkd_dbus_deps)
generated_files_headers = []
foreach s : generated_sources
foreach f : s.to_list()
p = f.full_path()
if p.endswith('.hpp')
generated_files_headers += f
endif
endforeach
endforeach
networkd_dbus_dep = declare_dependency(
sources: generated_files_headers,
include_directories: networkd_dbus_includes,
link_with: networkd_dbus_lib,
dependencies: networkd_dbus_deps)
subdir('src')
configure_file(
input: '60-phosphor-networkd-default.network.in',
output: '60-phosphor-networkd-default.network',
configuration: conf_data,
install: true,
install_dir: dependency('systemd').get_variable(
'systemdutildir') / 'network')
configure_file(
input: 'xyz.openbmc_project.Network.service.in',
output: 'xyz.openbmc_project.Network.service',
configuration: {
'SYSTEMD_TARGET': 'multi-user.target',
'DEFAULT_BUSNAME': default_busname,
},
install: true,
install_dir: dependency('systemd').get_variable(
'systemdsystemunitdir'))
configure_file(
input: 'xyz.openbmc_project.Network.conf.in',
output: 'xyz.openbmc_project.Network.conf',
configuration: {'DEFAULT_BUSNAME': default_busname},
install: true,
install_dir: get_option('datadir') / 'dbus-1' / 'system.d')
if not get_option('tests').disabled()
subdir('test')
endif