xref: /openbmc/sdbusplus/meson.build (revision 3e3a665a)
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('.')
12
13libsdbusplus_src = files(
14    'sdbusplus/exception.cpp',
15    'sdbusplus/sdbus.cpp',
16    'sdbusplus/server/transaction.cpp',
17)
18
19libsdbusplus = library(
20    'sdbusplus',
21    libsdbusplus_src,
22    dependencies: libsystemd_pkg,
23    version: meson.project_version(),
24    install: true,
25)
26
27sdbusplus_dep = declare_dependency(
28    include_directories: root_inc,
29    link_with: libsdbusplus,
30    dependencies: libsystemd_pkg
31)
32
33subdir('tools')
34
35boost_dep = dependency(
36    'boost',
37    required: false,
38    modules: [ 'coroutine' ],
39)
40pthread_dep = dependency('threads')
41
42subdir('example')
43subdir('test')
44
45install_subdir(
46    'sdbusplus',
47    install_dir: get_option('includedir'),
48    strip_directory: false,
49    # TODO (stwcx): Once we remove autotools, we can move these files
50    # out of the same directory as the headers and remove this.
51    exclude_files: [ 'exception.cpp', 'sdbus.cpp', 'server/transaction.cpp' ],
52)
53
54import('pkgconfig').generate(
55    libraries: libsdbusplus,
56    name: meson.project_name(),
57    version: meson.project_version(),
58    requires: libsystemd_pkg,
59    description: 'C++ bindings for sdbus',
60)
61