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