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