blob: fdec677587c342e5d0fb350e5027b052323f4fed [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'),
Kuiying Wang8f706212020-12-16 18:59:24 +080035 dependency('openssl'),
Kuiying Wang642f4372020-08-12 15:35:46 +080036]
37
38executable('biosconfig-manager',
39 'src/manager.cpp',
Tom Josephf1101df2020-11-06 08:23:34 +053040 'src/manager_serialize.cpp',
41 implicit_include_directories: true,
Kuiying Wang642f4372020-08-12 15:35:46 +080042 include_directories: ['include'],
43 dependencies: deps,
44 cpp_args : boost_args,
45 install: true,
46 install_dir: get_option('bindir'))
47
Kuiying Wang8f706212020-12-16 18:59:24 +080048executable('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
Kuiying Wang642f4372020-08-12 15:35:46 +080057systemd = 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)
Kuiying Wang8f706212020-12-16 18:59:24 +080069
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)