1project( 2 'phosphor-net-ipmid', 3 'cpp', 4 version: '1.0.0', 5 meson_version: '>=1.1.1', 6 default_options: [ 7 'warning_level=3', 8 'werror=true', 9 'cpp_std=c++23', 10 'buildtype=debugoptimized', 11 'b_lto=true', 12 ], 13) 14 15conf_data = configuration_data() 16conf_data.set('RMCP_PING', get_option('rmcp_ping').allowed()) 17conf_data.set('PAM_AUTHENTICATE', get_option('pam_authenticate').allowed()) 18 19configure_file(output: 'config.h', configuration: conf_data) 20 21sdbusplus_dep = dependency('sdbusplus') 22phosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces') 23phosphor_logging_dep = dependency('phosphor-logging') 24libsystemd_dep = dependency('libsystemd') 25libcrypto_dep = dependency('libcrypto') 26ipmid_dep = dependency('libipmid') 27userlayer_dep = dependency('libuserlayer') 28channellayer_dep = dependency('libchannellayer') 29 30# Project Arguments 31cpp = meson.get_compiler('cpp') 32if cpp.has_header('CLI/CLI.hpp') 33 cli11_dep = declare_dependency() 34else 35 cli11_dep = dependency('CLI11') 36endif 37 38add_project_arguments( 39 cpp.get_supported_arguments( 40 [ 41 '-DBOOST_ERROR_CODE_HEADER_ONLY', 42 '-DBOOST_SYSTEM_NO_DEPRECATED', 43 '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING', 44 '-DBOOST_ASIO_DISABLE_THREADS', 45 '-DBOOST_ALL_NO_LIB', 46 ], 47 ), 48 language: 'cpp', 49) 50 51deps = [ 52 cli11_dep, 53 ipmid_dep, 54 userlayer_dep, 55 channellayer_dep, 56 libcrypto_dep, 57 libsystemd_dep, 58 phosphor_dbus_interfaces_dep, 59 phosphor_logging_dep, 60 sdbusplus_dep, 61] 62 63sources = [ 64 'auth_algo.cpp', 65 'sessions_manager.cpp', 66 'message_parsers.cpp', 67 'message_handler.cpp', 68 'command_table.cpp', 69 'command/channel_auth.cpp', 70 'command/guid.cpp', 71 'command/open_session.cpp', 72 'command/rakp12.cpp', 73 'command/rakp34.cpp', 74 'command/session_cmds.cpp', 75 'comm_module.cpp', 76 'main.cpp', 77 'integrity_algo.cpp', 78 'crypt_algo.cpp', 79 'sd_event_loop.cpp', 80 'sol/sol_manager.cpp', 81 'sol/sol_context.cpp', 82 'command/sol_cmds.cpp', 83 'command/payload_cmds.cpp', 84 'sol_module.cpp', 85] 86 87executable( 88 'netipmid', 89 sources, 90 implicit_include_directories: true, 91 include_directories: ['command', 'sol'], 92 dependencies: deps, 93 install: true, 94 install_dir: get_option('bindir'), 95) 96 97systemd = dependency('systemd') 98systemd_system_unit_dir = systemd.get_variable( 99 'systemdsystemunitdir', 100 pkgconfig_define: ['prefix', get_option('prefix')], 101) 102 103configure_file( 104 input: 'phosphor-ipmi-net@.service', 105 output: 'phosphor-ipmi-net@.service', 106 copy: true, 107 install_dir: systemd_system_unit_dir, 108) 109 110configure_file( 111 input: 'phosphor-ipmi-net@.socket', 112 output: 'phosphor-ipmi-net@.socket', 113 copy: true, 114 install_dir: systemd_system_unit_dir, 115) 116 117build_tests = get_option('tests') 118if build_tests.allowed() 119 subdir('test') 120endif 121