194f781a8SGeorge Liuproject( 2*888f0d3eSPatrick Williams 'phosphor-net-ipmid', 3*888f0d3eSPatrick Williams 'cpp', 494f781a8SGeorge Liu version: '1.0.0', 511c48351SPatrick Williams meson_version: '>=1.1.1', 694f781a8SGeorge Liu default_options: [ 794f781a8SGeorge Liu 'warning_level=3', 894f781a8SGeorge Liu 'werror=true', 911c48351SPatrick Williams 'cpp_std=c++23', 1094f781a8SGeorge Liu 'buildtype=debugoptimized', 114c2ed9c3SKonstantin Aladyshev 'b_lto=true', 12*888f0d3eSPatrick Williams ], 1394f781a8SGeorge Liu) 1494f781a8SGeorge Liu 1594f781a8SGeorge Liuconf_data = configuration_data() 1677f3e3c7SPatrick Williamsconf_data.set('RMCP_PING', get_option('rmcp_ping').allowed()) 1777f3e3c7SPatrick Williamsconf_data.set('PAM_AUTHENTICATE', get_option('pam_authenticate').allowed()) 1894f781a8SGeorge Liu 19*888f0d3eSPatrick Williamsconfigure_file(output: 'config.h', configuration: conf_data) 2094f781a8SGeorge Liu 2194f781a8SGeorge Liusdbusplus_dep = dependency('sdbusplus') 2294f781a8SGeorge Liuphosphor_dbus_interfaces_dep = dependency('phosphor-dbus-interfaces') 2394f781a8SGeorge Liuphosphor_logging_dep = dependency('phosphor-logging') 2494f781a8SGeorge Liulibsystemd_dep = dependency('libsystemd') 2594f781a8SGeorge Liulibcrypto_dep = dependency('libcrypto') 2694f781a8SGeorge Liuipmid_dep = dependency('libipmid') 2794f781a8SGeorge Liuuserlayer_dep = dependency('libuserlayer') 2894f781a8SGeorge Liuchannellayer_dep = dependency('libchannellayer') 2994f781a8SGeorge Liu 3094f781a8SGeorge Liu# Project Arguments 3194f781a8SGeorge Liucpp = meson.get_compiler('cpp') 32c0552851SGeorge Liuif cpp.has_header('CLI/CLI.hpp') 33c0552851SGeorge Liu cli11_dep = declare_dependency() 34c0552851SGeorge Liuelse 35c0552851SGeorge Liu cli11_dep = dependency('CLI11') 36c0552851SGeorge Liuendif 37c0552851SGeorge Liu 3894f781a8SGeorge Liuadd_project_arguments( 39*888f0d3eSPatrick Williams cpp.get_supported_arguments( 40*888f0d3eSPatrick Williams [ 4194f781a8SGeorge Liu '-DBOOST_ERROR_CODE_HEADER_ONLY', 4294f781a8SGeorge Liu '-DBOOST_SYSTEM_NO_DEPRECATED', 4394f781a8SGeorge Liu '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING', 4494f781a8SGeorge Liu '-DBOOST_ASIO_DISABLE_THREADS', 4594f781a8SGeorge Liu '-DBOOST_ALL_NO_LIB', 46*888f0d3eSPatrick Williams ], 47*888f0d3eSPatrick Williams ), 48*888f0d3eSPatrick Williams language: 'cpp', 49*888f0d3eSPatrick Williams) 5094f781a8SGeorge Liu 5194f781a8SGeorge Liudeps = [ 52c0552851SGeorge Liu cli11_dep, 5394f781a8SGeorge Liu ipmid_dep, 5494f781a8SGeorge Liu userlayer_dep, 5594f781a8SGeorge Liu channellayer_dep, 5694f781a8SGeorge Liu libcrypto_dep, 5794f781a8SGeorge Liu libsystemd_dep, 5894f781a8SGeorge Liu phosphor_dbus_interfaces_dep, 5994f781a8SGeorge Liu phosphor_logging_dep, 6094f781a8SGeorge Liu sdbusplus_dep, 6194f781a8SGeorge Liu] 6294f781a8SGeorge Liu 6394f781a8SGeorge Liusources = [ 6494f781a8SGeorge Liu 'auth_algo.cpp', 6594f781a8SGeorge Liu 'sessions_manager.cpp', 6694f781a8SGeorge Liu 'message_parsers.cpp', 6794f781a8SGeorge Liu 'message_handler.cpp', 6894f781a8SGeorge Liu 'command_table.cpp', 6994f781a8SGeorge Liu 'command/channel_auth.cpp', 7094f781a8SGeorge Liu 'command/guid.cpp', 7194f781a8SGeorge Liu 'command/open_session.cpp', 7294f781a8SGeorge Liu 'command/rakp12.cpp', 7394f781a8SGeorge Liu 'command/rakp34.cpp', 7494f781a8SGeorge Liu 'command/session_cmds.cpp', 7594f781a8SGeorge Liu 'comm_module.cpp', 7694f781a8SGeorge Liu 'main.cpp', 7794f781a8SGeorge Liu 'integrity_algo.cpp', 7894f781a8SGeorge Liu 'crypt_algo.cpp', 7994f781a8SGeorge Liu 'sd_event_loop.cpp', 8094f781a8SGeorge Liu 'sol/sol_manager.cpp', 8194f781a8SGeorge Liu 'sol/sol_context.cpp', 8294f781a8SGeorge Liu 'command/sol_cmds.cpp', 8394f781a8SGeorge Liu 'command/payload_cmds.cpp', 8494f781a8SGeorge Liu 'sol_module.cpp', 8594f781a8SGeorge Liu] 8694f781a8SGeorge Liu 8794f781a8SGeorge Liuexecutable( 8894f781a8SGeorge Liu 'netipmid', 8994f781a8SGeorge Liu sources, 9094f781a8SGeorge Liu implicit_include_directories: true, 9194f781a8SGeorge Liu include_directories: ['command', 'sol'], 9294f781a8SGeorge Liu dependencies: deps, 9394f781a8SGeorge Liu install: true, 94*888f0d3eSPatrick Williams install_dir: get_option('bindir'), 9594f781a8SGeorge Liu) 9694f781a8SGeorge Liu 9794f781a8SGeorge Liusystemd = dependency('systemd') 9894f781a8SGeorge Liusystemd_system_unit_dir = systemd.get_variable( 99e81b7c9dSPatrick Williams 'systemdsystemunitdir', 100*888f0d3eSPatrick Williams pkgconfig_define: ['prefix', get_option('prefix')], 101*888f0d3eSPatrick Williams) 10294f781a8SGeorge Liu 103*888f0d3eSPatrick Williamsconfigure_file( 104*888f0d3eSPatrick Williams input: 'phosphor-ipmi-net@.service', 10594f781a8SGeorge Liu output: 'phosphor-ipmi-net@.service', 10694f781a8SGeorge Liu copy: true, 107*888f0d3eSPatrick Williams install_dir: systemd_system_unit_dir, 108*888f0d3eSPatrick Williams) 10994f781a8SGeorge Liu 110*888f0d3eSPatrick Williamsconfigure_file( 111*888f0d3eSPatrick Williams input: 'phosphor-ipmi-net@.socket', 11294f781a8SGeorge Liu output: 'phosphor-ipmi-net@.socket', 11394f781a8SGeorge Liu copy: true, 114*888f0d3eSPatrick Williams install_dir: systemd_system_unit_dir, 115*888f0d3eSPatrick Williams) 11694f781a8SGeorge Liu 11794f781a8SGeorge Liubuild_tests = get_option('tests') 11877f3e3c7SPatrick Williamsif build_tests.allowed() 11994f781a8SGeorge Liu subdir('test') 12094f781a8SGeorge Liuendif 121