1user_channel_inc = include_directories('.') 2 3channellayer_pre = declare_dependency( 4 include_directories: [root_inc, user_channel_inc], 5 dependencies: [ 6 crypto, 7 ipmid_dep, 8 nlohmann_json_dep, 9 phosphor_dbus_interfaces_dep, 10 phosphor_logging_dep, 11 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 34import('pkgconfig').generate( 35 channellayer_lib, 36 name: 'libchannellayer', 37 version: meson.project_version(), 38 description: 'libchannellayer') 39 40if 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, 47 nlohmann_json_dep, 48 pam, 49 phosphor_dbus_interfaces_dep, 50 phosphor_logging_dep, 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: [ 77 mapper, 78 phosphor_logging_dep, 79 ipmid_dep, 80 userlayer_dep, 81 channellayer_dep, 82 ]) 83 84 usercmds_lib = library( 85 'usercmds', 86 'usercommands.cpp', 87 implicit_include_directories: false, 88 dependencies: usercmds_pre, 89 install: true, 90 install_dir: get_option('libdir') / 'ipmid-providers', 91 version: meson.project_version(), 92 override_options: ['b_lundef=false']) 93 94 import('pkgconfig').generate( 95 userlayer_lib, 96 name: 'libuserlayer', 97 version: meson.project_version(), 98 description: 'libuserlayer') 99 100endif 101