xref: /openbmc/bios-settings-mgr/meson.build (revision 8f706213ccc2900e1a02fedb26073065897b02c3)
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
19conf_data = configuration_data()
20conf_data.set_quoted('BIOS_PERSIST_PATH', get_option('bios-persist-path'))
21configure_file(output: 'config.h', configuration: conf_data)
22
23boost_args = ['-DBOOST_ALL_NO_LIB',
24              '-DBOOST_ASIO_DISABLE_THREADS',
25              '-DBOOST_ERROR_CODE_HEADER_ONLY',
26              '-DBOOST_NO_RTTI',
27              '-DBOOST_NO_TYPEID',
28              '-DBOOST_SYSTEM_NO_DEPRECATED']
29
30deps = [dependency('boost'),
31        dependency('phosphor-dbus-interfaces'),
32        dependency('phosphor-logging'),
33        dependency('sdbusplus'),
34        dependency('systemd'),
35        dependency('openssl'),
36]
37
38executable('biosconfig-manager',
39           'src/manager.cpp',
40           'src/manager_serialize.cpp',
41        implicit_include_directories: true,
42        include_directories: ['include'],
43        dependencies: deps,
44        cpp_args : boost_args,
45        install: true,
46        install_dir: get_option('bindir'))
47
48executable('biosconfig-password',
49           'src/password.cpp',
50        implicit_include_directories: true,
51        include_directories: ['include'],
52        dependencies: deps,
53        cpp_args : boost_args,
54        install: true,
55        install_dir: get_option('bindir'))
56
57systemd = dependency('systemd')
58systemd_system_unit_dir = systemd.get_pkgconfig_variable(
59    'systemdsystemunitdir',
60    define_variable: ['prefix', get_option('prefix')])
61
62configure_file(
63    copy: true,
64    input: 'service_files/xyz.openbmc_project.biosconfig_manager.service',
65    install: true,
66    install_dir: systemd_system_unit_dir,
67    output: 'xyz.openbmc_project.biosconfig_manager.service'
68)
69
70configure_file(
71    copy: true,
72    input: 'service_files/xyz.openbmc_project.biosconfig_password.service',
73    install: true,
74    install_dir: systemd_system_unit_dir,
75    output: 'xyz.openbmc_project.biosconfig_password.service'
76)