Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 1 | user_channel_inc = include_directories('.') |
| 2 | |
| 3 | channellayer_pre = declare_dependency( |
| 4 | include_directories: [root_inc, user_channel_inc], |
| 5 | dependencies: [ |
| 6 | crypto, |
| 7 | ipmid_dep, |
Patrick Williams | c8fc728 | 2022-06-16 11:58:53 -0500 | [diff] [blame] | 8 | nlohmann_json_dep, |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 9 | phosphor_dbus_interfaces_dep, |
| 10 | phosphor_logging_dep, |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 11 | systemd, |
| 12 | ]) |
| 13 | |
| 14 | channellayer_src = [ |
| 15 | 'channel_layer.cpp', |
| 16 | 'channel_mgmt.cpp', |
| 17 | 'cipher_mgmt.cpp', |
| 18 | ] |
| 19 | |
| 20 | channellayer_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 | |
| 30 | channellayer_dep = declare_dependency( |
| 31 | link_with: channellayer_lib, |
| 32 | dependencies: channellayer_pre) |
| 33 | |
George Liu | 8d90f97 | 2022-07-04 15:16:33 +0800 | [diff] [blame] | 34 | import('pkgconfig').generate( |
| 35 | channellayer_lib, |
| 36 | name: 'libchannellayer', |
| 37 | version: meson.project_version(), |
| 38 | description: 'libchannellayer') |
| 39 | |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 40 | if 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 Williams | c8fc728 | 2022-06-16 11:58:53 -0500 | [diff] [blame] | 47 | nlohmann_json_dep, |
| 48 | pam, |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 49 | phosphor_dbus_interfaces_dep, |
| 50 | phosphor_logging_dep, |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 51 | 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 Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 77 | phosphor_logging_dep, |
| 78 | ipmid_dep, |
| 79 | userlayer_dep, |
| 80 | channellayer_dep, |
| 81 | ]) |
| 82 | |
Willy Tu | ba9bbb6 | 2022-06-01 03:41:15 -0700 | [diff] [blame] | 83 | usercmds_lib = library( |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 84 | '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 Tu | ba9bbb6 | 2022-06-01 03:41:15 -0700 | [diff] [blame] | 90 | version: meson.project_version(), |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 91 | override_options: ['b_lundef=false']) |
| 92 | |
George Liu | 8d90f97 | 2022-07-04 15:16:33 +0800 | [diff] [blame] | 93 | import('pkgconfig').generate( |
| 94 | userlayer_lib, |
| 95 | name: 'libuserlayer', |
| 96 | version: meson.project_version(), |
| 97 | description: 'libuserlayer') |
| 98 | |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 99 | endif |