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