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