blob: 9e0421eef2d55a79f16633315ef20f747f17f7e4 [file] [log] [blame]
Tom Joseph82e95572020-05-07 20:28:05 +05301project(
2 'phosphor-srvcfg-manager',
3 'cpp',
4 default_options: [
5 'warning_level=3',
6 'werror=true',
Patrick Williams70c78fe2023-07-12 11:15:58 -05007 'cpp_std=c++23'
Tom Joseph82e95572020-05-07 20:28:05 +05308 ],
9 license: 'Apache-2.0',
10 version: '1.0',
Patrick Williams70c78fe2023-07-12 11:15:58 -050011 meson_version: '>=1.1.1',
Tom Joseph82e95572020-05-07 20:28:05 +053012)
13
14# Wno-psabi reduces the number of "Note:" messages when cross-compiling some STL
15# stuff for ARM. See https://stackoverflow.com/questions/48149323/strange-gcc-warning-when-compiling-qt-project
16# Basically, gcc 6 and gcc 7 are not ABI compatible, but since the whole OpenBMC
17# project uses the same compiler, we can safely ignmore these info notes.
18add_project_arguments('-Wno-psabi', language: 'cpp')
19
20boost_args = ['-DBOOST_ALL_NO_LIB',
21 '-DBOOST_ASIO_DISABLE_THREADS',
22 '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING',
23 '-DBOOST_ERROR_CODE_HEADER_ONLY',
24 '-DBOOST_NO_RTTI',
25 '-DBOOST_NO_TYPEID',
26 '-DBOOST_SYSTEM_NO_DEPRECATED']
27
28deps = [dependency('boost'),
29 dependency('boost', modules : ['coroutine']),
Patrick Williamseca056e2022-03-21 10:16:38 -050030 dependency('phosphor-dbus-interfaces'),
31 dependency('phosphor-logging'),
32 dependency('sdbusplus'),
Tom Joseph82e95572020-05-07 20:28:05 +053033 dependency('systemd'),
34]
35
Chicago Duan25a0f632021-11-11 16:32:07 +080036if(get_option('usb-code-update').enabled())
37 add_project_arguments('-DUSB_CODE_UPDATE', language : 'cpp')
38endif
39
Tom Joseph82e95572020-05-07 20:28:05 +053040executable('phosphor-srvcfg-manager',
41 'src/main.cpp',
42 'src/srvcfg_manager.cpp',
43 'src/utils.cpp',
44 implicit_include_directories: false,
45 include_directories: ['inc'],
46 dependencies: deps,
47 cpp_args : boost_args,
48 install: true,
49 install_dir: get_option('bindir'))
50
51systemd = dependency('systemd')
Patrik Tesarik9cd87072021-06-02 19:42:40 +020052systemd_system_unit_dir = systemd.get_variable(
Patrick Williams070dd972023-04-12 08:01:25 -050053 'systemdsystemunitdir',
Patrik Tesarik9cd87072021-06-02 19:42:40 +020054 pkgconfig_define: ['prefix', get_option('prefix')])
Tom Joseph82e95572020-05-07 20:28:05 +053055
56configure_file(
57 copy: true,
58 input: 'srvcfg-manager.service',
59 install: true,
60 install_dir: systemd_system_unit_dir,
61 output: 'srvcfg-manager.service'
62)