xref: /openbmc/bios-settings-mgr/meson.build (revision 642f437e)
1project(
2    'biosconfig-manager',
3    'cpp',
4    default_options: [
5        'warning_level=3',
6        'werror=true',
7        'cpp_std=c++17'
8    ],
9    license: 'Apache-2.0',
10    version: '1.0',
11)
12
13# Wno-psabi reduces the number of "Note:" messages when cross-compiling some STL
14# stuff for ARM. See https://stackoverflow.com/questions/48149323/strange-gcc-warning-when-compiling-qt-project
15# Basically, gcc 6 and gcc 7 are not ABI compatible, but since the whole OpenBMC
16# project uses the same compiler, we can safely ignmore these info notes.
17add_project_arguments('-Wno-psabi', language: 'cpp')
18
19boost_args = ['-DBOOST_ALL_NO_LIB',
20              '-DBOOST_ASIO_DISABLE_THREADS',
21              '-DBOOST_ERROR_CODE_HEADER_ONLY',
22              '-DBOOST_NO_RTTI',
23              '-DBOOST_NO_TYPEID',
24              '-DBOOST_SYSTEM_NO_DEPRECATED']
25
26deps = [dependency('boost'),
27        dependency('phosphor-dbus-interfaces'),
28        dependency('phosphor-logging'),
29        dependency('sdbusplus'),
30        dependency('systemd'),
31]
32
33executable('biosconfig-manager',
34           'src/manager.cpp',
35        implicit_include_directories: false,
36        include_directories: ['include'],
37        dependencies: deps,
38        cpp_args : boost_args,
39        install: true,
40        install_dir: get_option('bindir'))
41
42systemd = dependency('systemd')
43systemd_system_unit_dir = systemd.get_pkgconfig_variable(
44    'systemdsystemunitdir',
45    define_variable: ['prefix', get_option('prefix')])
46
47configure_file(
48    copy: true,
49    input: 'service_files/xyz.openbmc_project.biosconfig_manager.service',
50    install: true,
51    install_dir: systemd_system_unit_dir,
52    output: 'xyz.openbmc_project.biosconfig_manager.service'
53)
54