xref: /openbmc/sdbusplus/meson.build (revision e113b206)
1project('sdbusplus', 'cpp', 'c',
2    default_options: [
3      'buildtype=debugoptimized',
4      'cpp_std=c++17',
5      'werror=true',
6    ],
7    version: '1.0.0',
8)
9
10libsystemd_pkg = dependency('libsystemd')
11root_inc = include_directories('include')
12
13libsdbusplus_src = files(
14    'src/exception.cpp',
15    'src/sdbus.cpp',
16    'src/server/transaction.cpp',
17)
18
19libsdbusplus = library(
20    'sdbusplus',
21    libsdbusplus_src,
22    include_directories: root_inc,
23    dependencies: libsystemd_pkg,
24    version: meson.project_version(),
25    install: true,
26)
27
28sdbusplus_dep = declare_dependency(
29    include_directories: root_inc,
30    link_with: libsdbusplus,
31    dependencies: libsystemd_pkg
32)
33
34subdir('tools')
35
36pthread_dep = dependency('threads')
37boost_dep = dependency(
38    'boost',
39    disabler: true,
40    required: false,
41    modules: [ 'coroutine' ],
42)
43
44subdir('example')
45subdir('test')
46
47install_subdir(
48    'include/sdbusplus',
49    install_dir: get_option('includedir'),
50    strip_directory: false,
51)
52
53import('pkgconfig').generate(
54    libraries: libsdbusplus,
55    name: meson.project_name(),
56    version: meson.project_version(),
57    requires: libsystemd_pkg,
58    description: 'C++ bindings for sdbus',
59)
60