blob: 1a685ce8015c1612942564fff629b4d9558959f1 [file] [log] [blame]
George Liu94f781a2022-07-04 14:35:10 +08001project(
2 'phosphor-net-ipmid', 'cpp',
3 version : '1.0.0',
Patrick Williams11c48352023-07-12 11:15:22 -05004 meson_version: '>=1.1.1',
George Liu94f781a2022-07-04 14:35:10 +08005 default_options: [
6 'warning_level=3',
7 'werror=true',
Patrick Williams11c48352023-07-12 11:15:22 -05008 'cpp_std=c++23',
George Liu94f781a2022-07-04 14:35:10 +08009 'buildtype=debugoptimized',
10 ]
11)
12
13conf_data = configuration_data()
14conf_data.set('RMCP_PING', get_option('rmcp_ping').enabled())
Willy Tu2c95dd12023-03-03 16:26:44 -080015conf_data.set('PAM_AUTHENTICATE', get_option('pam_authenticate').enabled())
George Liu94f781a2022-07-04 14:35:10 +080016
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')
29mapper = dependency('libmapper')
30
31# Project Arguments
32cpp = meson.get_compiler('cpp')
33add_project_arguments(
34 cpp.get_supported_arguments([
35 '-DBOOST_ERROR_CODE_HEADER_ONLY',
36 '-DBOOST_SYSTEM_NO_DEPRECATED',
37 '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING',
38 '-DBOOST_ASIO_DISABLE_THREADS',
39 '-DBOOST_ALL_NO_LIB',
40 ]),
41 language : 'cpp')
42
43deps = [
44 ipmid_dep,
45 userlayer_dep,
46 channellayer_dep,
47 libcrypto_dep,
48 libsystemd_dep,
49 phosphor_dbus_interfaces_dep,
50 phosphor_logging_dep,
51 sdbusplus_dep,
52 mapper,
53]
54
55sources = [
56 'auth_algo.cpp',
57 'sessions_manager.cpp',
58 'message_parsers.cpp',
59 'message_handler.cpp',
60 'command_table.cpp',
61 'command/channel_auth.cpp',
62 'command/guid.cpp',
63 'command/open_session.cpp',
64 'command/rakp12.cpp',
65 'command/rakp34.cpp',
66 'command/session_cmds.cpp',
67 'comm_module.cpp',
68 'main.cpp',
69 'integrity_algo.cpp',
70 'crypt_algo.cpp',
71 'sd_event_loop.cpp',
72 'sol/sol_manager.cpp',
73 'sol/sol_context.cpp',
74 'command/sol_cmds.cpp',
75 'command/payload_cmds.cpp',
76 'sol_module.cpp',
77]
78
79executable(
80 'netipmid',
81 sources,
82 implicit_include_directories: true,
83 include_directories: ['command', 'sol'],
84 dependencies: deps,
85 install: true,
86 install_dir: get_option('bindir')
87)
88
89systemd = dependency('systemd')
90systemd_system_unit_dir = systemd.get_variable(
Patrick Williamse81b7c92023-04-12 08:01:04 -050091 'systemdsystemunitdir',
George Liu94f781a2022-07-04 14:35:10 +080092 pkgconfig_define: ['prefix', get_option('prefix')])
93
94configure_file(input: 'phosphor-ipmi-net@.service',
95 output: 'phosphor-ipmi-net@.service',
96 copy: true,
97 install_dir: systemd_system_unit_dir)
98
99configure_file(input: 'phosphor-ipmi-net@.socket',
100 output: 'phosphor-ipmi-net@.socket',
101 copy: true,
102 install_dir: systemd_system_unit_dir)
103
104build_tests = get_option('tests')
105if not build_tests.disabled()
106 subdir('test')
107endif