blob: 696bc87bed8821a2a4cc96a5f39443f41e081486 [file] [log] [blame]
Tom Joseph82e95572020-05-07 20:28:05 +05301project(
2 'phosphor-srvcfg-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_COROUTINES_NO_DEPRECATION_WARNING',
22 '-DBOOST_ERROR_CODE_HEADER_ONLY',
23 '-DBOOST_NO_RTTI',
24 '-DBOOST_NO_TYPEID',
25 '-DBOOST_SYSTEM_NO_DEPRECATED']
26
27deps = [dependency('boost'),
28 dependency('boost', modules : ['coroutine']),
29 dependency('phosphor-dbus-interfaces'),
30 dependency('phosphor-logging'),
31 dependency('sdbusplus'),
32 dependency('systemd'),
33]
34
35executable('phosphor-srvcfg-manager',
36 'src/main.cpp',
37 'src/srvcfg_manager.cpp',
38 'src/utils.cpp',
39 implicit_include_directories: false,
40 include_directories: ['inc'],
41 dependencies: deps,
42 cpp_args : boost_args,
43 install: true,
44 install_dir: get_option('bindir'))
45
46systemd = dependency('systemd')
47systemd_system_unit_dir = systemd.get_pkgconfig_variable(
48 'systemdsystemunitdir',
49 define_variable: ['prefix', get_option('prefix')])
50
51configure_file(
52 copy: true,
53 input: 'srvcfg-manager.service',
54 install: true,
55 install_dir: systemd_system_unit_dir,
56 output: 'srvcfg-manager.service'
57)