blob: e23a60abb32ff26e0291faca7019918c8543d124 [file] [log] [blame]
Kuiying Wang642f4372020-08-12 15:35:46 +08001project(
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
Tom Josephf1101df2020-11-06 08:23:34 +053019conf_data = configuration_data()
20conf_data.set_quoted('BIOS_PERSIST_PATH', get_option('bios-persist-path'))
21configure_file(output: 'config.h', configuration: conf_data)
22
Kuiying Wang642f4372020-08-12 15:35:46 +080023boost_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]
36
37executable('biosconfig-manager',
38 'src/manager.cpp',
Tom Josephf1101df2020-11-06 08:23:34 +053039 'src/manager_serialize.cpp',
40 implicit_include_directories: true,
Kuiying Wang642f4372020-08-12 15:35:46 +080041 include_directories: ['include'],
42 dependencies: deps,
43 cpp_args : boost_args,
44 install: true,
45 install_dir: get_option('bindir'))
46
47systemd = dependency('systemd')
48systemd_system_unit_dir = systemd.get_pkgconfig_variable(
49 'systemdsystemunitdir',
50 define_variable: ['prefix', get_option('prefix')])
51
52configure_file(
53 copy: true,
54 input: 'service_files/xyz.openbmc_project.biosconfig_manager.service',
55 install: true,
56 install_dir: systemd_system_unit_dir,
57 output: 'xyz.openbmc_project.biosconfig_manager.service'
58)