blob: 1808b2beb42669a95d0432583aa14c7866583861 [file] [log] [blame]
Willy Tuc710b972021-08-11 16:33:43 -07001user_channel_inc = include_directories('.')
2
3channellayer_pre = declare_dependency(
4 include_directories: [root_inc, user_channel_inc],
5 dependencies: [
6 crypto,
7 ipmid_dep,
Patrick Williamsc8fc7282022-06-16 11:58:53 -05008 nlohmann_json_dep,
Willy Tuc710b972021-08-11 16:33:43 -07009 phosphor_dbus_interfaces_dep,
10 phosphor_logging_dep,
Willy Tuc710b972021-08-11 16:33:43 -070011 systemd,
12 ])
13
14channellayer_src = [
15 'channel_layer.cpp',
16 'channel_mgmt.cpp',
17 'cipher_mgmt.cpp',
18]
19
20channellayer_lib = library(
21 'channellayer',
22 channellayer_src,
23 implicit_include_directories: false,
24 dependencies: channellayer_pre,
25 version: meson.project_version(),
26 install: true,
27 install_dir: get_option('libdir'),
28 override_options: ['b_lundef=false'])
29
30channellayer_dep = declare_dependency(
31 link_with: channellayer_lib,
32 dependencies: channellayer_pre)
33
George Liu8d90f972022-07-04 15:16:33 +080034import('pkgconfig').generate(
35 channellayer_lib,
36 name: 'libchannellayer',
37 version: meson.project_version(),
38 description: 'libchannellayer')
39
Willy Tuc710b972021-08-11 16:33:43 -070040if not get_option('libuserlayer').disabled()
41 userlayer_pre = declare_dependency(
42 include_directories: [root_inc, user_channel_inc],
43 dependencies: [
44 channellayer_dep,
45 crypto,
46 ipmid_dep,
Patrick Williamsc8fc7282022-06-16 11:58:53 -050047 nlohmann_json_dep,
48 pam,
Willy Tuc710b972021-08-11 16:33:43 -070049 phosphor_dbus_interfaces_dep,
50 phosphor_logging_dep,
Willy Tuc710b972021-08-11 16:33:43 -070051 systemd,
52 ])
53
54 userlayer_src = [
55 'user_layer.cpp',
56 'user_mgmt.cpp',
57 'passwd_mgr.cpp',
58 ]
59
60 userlayer_lib = library(
61 'userlayer',
62 userlayer_src,
63 implicit_include_directories: false,
64 dependencies: userlayer_pre,
65 version: meson.project_version(),
66 install: true,
67 install_dir: get_option('libdir'),
68 override_options: ['b_lundef=false'])
69
70 userlayer_dep = declare_dependency(
71 link_with: userlayer_lib,
72 dependencies: userlayer_pre)
73
74 usercmds_pre = declare_dependency(
75 include_directories: [root_inc, user_channel_inc],
76 dependencies: [
77 mapper,
78 phosphor_logging_dep,
79 ipmid_dep,
80 userlayer_dep,
81 channellayer_dep,
82 ])
83
Willy Tuba9bbb62022-06-01 03:41:15 -070084 usercmds_lib = library(
Willy Tuc710b972021-08-11 16:33:43 -070085 'usercmds',
86 'usercommands.cpp',
87 implicit_include_directories: false,
88 dependencies: usercmds_pre,
89 install: true,
90 install_dir: get_option('libdir') / 'ipmid-providers',
Willy Tuba9bbb62022-06-01 03:41:15 -070091 version: meson.project_version(),
Willy Tuc710b972021-08-11 16:33:43 -070092 override_options: ['b_lundef=false'])
93
George Liu8d90f972022-07-04 15:16:33 +080094 import('pkgconfig').generate(
95 userlayer_lib,
96 name: 'libuserlayer',
97 version: meson.project_version(),
98 description: 'libuserlayer')
99
Willy Tuc710b972021-08-11 16:33:43 -0700100endif