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, |
| 8 | phosphor_dbus_interfaces_dep, |
| 9 | phosphor_logging_dep, |
| 10 | std_cpp_fs, |
| 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 | |
| 34 | if not get_option('libuserlayer').disabled() |
| 35 | userlayer_pre = declare_dependency( |
| 36 | include_directories: [root_inc, user_channel_inc], |
| 37 | dependencies: [ |
| 38 | channellayer_dep, |
| 39 | crypto, |
| 40 | ipmid_dep, |
| 41 | phosphor_dbus_interfaces_dep, |
| 42 | phosphor_logging_dep, |
| 43 | pam, |
| 44 | std_cpp_fs, |
| 45 | systemd, |
| 46 | ]) |
| 47 | |
| 48 | userlayer_src = [ |
| 49 | 'user_layer.cpp', |
| 50 | 'user_mgmt.cpp', |
| 51 | 'passwd_mgr.cpp', |
| 52 | ] |
| 53 | |
| 54 | userlayer_lib = library( |
| 55 | 'userlayer', |
| 56 | userlayer_src, |
| 57 | implicit_include_directories: false, |
| 58 | dependencies: userlayer_pre, |
| 59 | version: meson.project_version(), |
| 60 | install: true, |
| 61 | install_dir: get_option('libdir'), |
| 62 | override_options: ['b_lundef=false']) |
| 63 | |
| 64 | userlayer_dep = declare_dependency( |
| 65 | link_with: userlayer_lib, |
| 66 | dependencies: userlayer_pre) |
| 67 | |
| 68 | usercmds_pre = declare_dependency( |
| 69 | include_directories: [root_inc, user_channel_inc], |
| 70 | dependencies: [ |
| 71 | mapper, |
| 72 | phosphor_logging_dep, |
| 73 | ipmid_dep, |
| 74 | userlayer_dep, |
| 75 | channellayer_dep, |
| 76 | ]) |
| 77 | |
Willy Tu | ba9bbb6 | 2022-06-01 03:41:15 -0700 | [diff] [blame] | 78 | usercmds_lib = library( |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 79 | 'usercmds', |
| 80 | 'usercommands.cpp', |
| 81 | implicit_include_directories: false, |
| 82 | dependencies: usercmds_pre, |
| 83 | install: true, |
| 84 | install_dir: get_option('libdir') / 'ipmid-providers', |
Willy Tu | ba9bbb6 | 2022-06-01 03:41:15 -0700 | [diff] [blame] | 85 | version: meson.project_version(), |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 86 | override_options: ['b_lundef=false']) |
| 87 | |
Willy Tu | c710b97 | 2021-08-11 16:33:43 -0700 | [diff] [blame] | 88 | endif |