blob: 73bdd3225d0253e8f6ca341ba48f4a109038be02 [file] [log] [blame]
Tom Joseph82e95572020-05-07 20:28:05 +05301project(
2 'phosphor-srvcfg-manager',
3 'cpp',
Patrick Williamscb282492025-02-01 08:38:01 -05004 default_options: ['warning_level=3', 'werror=true', 'cpp_std=c++23'],
Tom Joseph82e95572020-05-07 20:28:05 +05305 license: 'Apache-2.0',
6 version: '1.0',
Patrick Williams70c78fe2023-07-12 11:15:58 -05007 meson_version: '>=1.1.1',
Tom Joseph82e95572020-05-07 20:28:05 +05308)
9
10# Wno-psabi reduces the number of "Note:" messages when cross-compiling some STL
11# stuff for ARM. See https://stackoverflow.com/questions/48149323/strange-gcc-warning-when-compiling-qt-project
12# Basically, gcc 6 and gcc 7 are not ABI compatible, but since the whole OpenBMC
13# project uses the same compiler, we can safely ignmore these info notes.
14add_project_arguments('-Wno-psabi', language: 'cpp')
15
Patrick Williamscb282492025-02-01 08:38:01 -050016boost_args = [
17 '-DBOOST_ALL_NO_LIB',
18 '-DBOOST_ASIO_DISABLE_THREADS',
19 '-DBOOST_COROUTINES_NO_DEPRECATION_WARNING',
20 '-DBOOST_ERROR_CODE_HEADER_ONLY',
21 '-DBOOST_NO_RTTI',
22 '-DBOOST_NO_TYPEID',
23 '-DBOOST_SYSTEM_NO_DEPRECATED',
Tom Joseph82e95572020-05-07 20:28:05 +053024]
25
Patrick Williamscb282492025-02-01 08:38:01 -050026deps = [
27 dependency('boost'),
28 dependency('boost', modules: ['coroutine']),
29 dependency('phosphor-dbus-interfaces'),
30 dependency('phosphor-logging'),
31 dependency('sdbusplus'),
32 dependency('libsystemd'),
33]
34
35if (get_option('usb-code-update').allowed())
36 add_project_arguments('-DUSB_CODE_UPDATE', language: 'cpp')
Chicago Duan25a0f632021-11-11 16:32:07 +080037endif
38
Patrick Williamscb282492025-02-01 08:38:01 -050039executable(
40 '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)
Tom Joseph82e95572020-05-07 20:28:05 +053051
52systemd = dependency('systemd')
Patrik Tesarik9cd87072021-06-02 19:42:40 +020053systemd_system_unit_dir = systemd.get_variable(
Patrick Williams070dd972023-04-12 08:01:25 -050054 'systemdsystemunitdir',
Patrick Williamscb282492025-02-01 08:38:01 -050055 pkgconfig_define: ['prefix', get_option('prefix')],
56)
Tom Joseph82e95572020-05-07 20:28:05 +053057
George Liuc241bde2023-08-16 16:02:28 +080058fs = import('fs')
59fs.copyfile(
60 'srvcfg-manager.service',
Tom Joseph82e95572020-05-07 20:28:05 +053061 install: true,
Patrick Williamscb282492025-02-01 08:38:01 -050062 install_dir: systemd_system_unit_dir,
Tom Joseph82e95572020-05-07 20:28:05 +053063)