blob: d4f1126bf1160f54995607c9649d8dbdb6aad057 [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: [
Willy Tuc710b972021-08-11 16:33:43 -070077 phosphor_logging_dep,
78 ipmid_dep,
79 userlayer_dep,
80 channellayer_dep,
81 ])
82
Willy Tuba9bbb62022-06-01 03:41:15 -070083 usercmds_lib = library(
Willy Tuc710b972021-08-11 16:33:43 -070084 'usercmds',
85 'usercommands.cpp',
86 implicit_include_directories: false,
87 dependencies: usercmds_pre,
88 install: true,
89 install_dir: get_option('libdir') / 'ipmid-providers',
Willy Tuba9bbb62022-06-01 03:41:15 -070090 version: meson.project_version(),
Willy Tuc710b972021-08-11 16:33:43 -070091 override_options: ['b_lundef=false'])
92
George Liu8d90f972022-07-04 15:16:33 +080093 import('pkgconfig').generate(
94 userlayer_lib,
95 name: 'libuserlayer',
96 version: meson.project_version(),
97 description: 'libuserlayer')
98
Willy Tuc710b972021-08-11 16:33:43 -070099endif