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 ] 11) 12 13conf_data = configuration_data() 14conf_data.set('RMCP_PING', get_option('rmcp_ping').enabled()) 15conf_data.set('PAM_AUTHENTICATE', get_option('pam_authenticate').enabled()) 16 17configure_file(output: 'config.h', 18 configuration: conf_data 19) 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 '-DBOOST_ERROR_CODE_HEADER_ONLY', 41 '-DBOOST_SYSTEM_NO_DEPRECATED', 42 '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING', 43 '-DBOOST_ASIO_DISABLE_THREADS', 44 '-DBOOST_ALL_NO_LIB', 45 ]), 46 language : 'cpp') 47 48deps = [ 49 cli11_dep, 50 ipmid_dep, 51 userlayer_dep, 52 channellayer_dep, 53 libcrypto_dep, 54 libsystemd_dep, 55 phosphor_dbus_interfaces_dep, 56 phosphor_logging_dep, 57 sdbusplus_dep, 58] 59 60sources = [ 61 'auth_algo.cpp', 62 'sessions_manager.cpp', 63 'message_parsers.cpp', 64 'message_handler.cpp', 65 'command_table.cpp', 66 'command/channel_auth.cpp', 67 'command/guid.cpp', 68 'command/open_session.cpp', 69 'command/rakp12.cpp', 70 'command/rakp34.cpp', 71 'command/session_cmds.cpp', 72 'comm_module.cpp', 73 'main.cpp', 74 'integrity_algo.cpp', 75 'crypt_algo.cpp', 76 'sd_event_loop.cpp', 77 'sol/sol_manager.cpp', 78 'sol/sol_context.cpp', 79 'command/sol_cmds.cpp', 80 'command/payload_cmds.cpp', 81 'sol_module.cpp', 82] 83 84executable( 85 'netipmid', 86 sources, 87 implicit_include_directories: true, 88 include_directories: ['command', 'sol'], 89 dependencies: deps, 90 install: true, 91 install_dir: get_option('bindir') 92) 93 94systemd = dependency('systemd') 95systemd_system_unit_dir = systemd.get_variable( 96 'systemdsystemunitdir', 97 pkgconfig_define: ['prefix', get_option('prefix')]) 98 99configure_file(input: 'phosphor-ipmi-net@.service', 100 output: 'phosphor-ipmi-net@.service', 101 copy: true, 102 install_dir: systemd_system_unit_dir) 103 104configure_file(input: 'phosphor-ipmi-net@.socket', 105 output: 'phosphor-ipmi-net@.socket', 106 copy: true, 107 install_dir: systemd_system_unit_dir) 108 109build_tests = get_option('tests') 110if not build_tests.disabled() 111 subdir('test') 112endif 113