blob: 2681be7be5fd959d9b2465dba5a8a74465d89d72 [file] [log] [blame]
Patrick Williamsad145e02020-05-19 16:45:15 -05001project('sdbusplus', 'cpp', 'c',
Patrick Williams98d71082020-05-15 18:55:16 -05002 default_options: [
Patrick Williamsfeb48472020-05-19 06:23:10 -05003 'buildtype=debugoptimized',
Patrick Williams98d71082020-05-15 18:55:16 -05004 'cpp_std=c++17',
5 'werror=true',
6 ],
7 version: '1.0.0',
8)
9
10libsystemd_pkg = dependency('libsystemd')
Patrick Williams7f664252020-06-04 10:20:56 -050011root_inc = include_directories('include')
Patrick Williams98d71082020-05-15 18:55:16 -050012
13libsdbusplus_src = files(
Patrick Williams7f664252020-06-04 10:20:56 -050014 'src/exception.cpp',
15 'src/sdbus.cpp',
16 'src/server/transaction.cpp',
Patrick Williams98d71082020-05-15 18:55:16 -050017)
18
William A. Kennington IIIf69a8b72020-05-28 12:59:40 -070019libsdbusplus = library(
Patrick Williams98d71082020-05-15 18:55:16 -050020 'sdbusplus',
21 libsdbusplus_src,
Patrick Williams7f664252020-06-04 10:20:56 -050022 include_directories: root_inc,
Patrick Williams98d71082020-05-15 18:55:16 -050023 dependencies: libsystemd_pkg,
24 version: meson.project_version(),
25 install: true,
26)
27
Patrick Williamsd0285b92020-06-01 09:43:47 -050028sdbusplus_dep = declare_dependency(
29 include_directories: root_inc,
30 link_with: libsdbusplus,
31 dependencies: libsystemd_pkg
32)
33
Patrick Williamsad145e02020-05-19 16:45:15 -050034subdir('tools')
35
Patrick Williamsad145e02020-05-19 16:45:15 -050036pthread_dep = dependency('threads')
37
38subdir('example')
39subdir('test')
40
Patrick Williams98d71082020-05-15 18:55:16 -050041install_subdir(
Patrick Williams7f664252020-06-04 10:20:56 -050042 'include/sdbusplus',
Patrick Williams98d71082020-05-15 18:55:16 -050043 install_dir: get_option('includedir'),
44 strip_directory: false,
Patrick Williams98d71082020-05-15 18:55:16 -050045)
46
47import('pkgconfig').generate(
48 libraries: libsdbusplus,
49 name: meson.project_name(),
50 version: meson.project_version(),
Patrick Williamsfa3137a2020-05-28 14:49:15 -050051 requires: libsystemd_pkg,
Patrick Williams98d71082020-05-15 18:55:16 -050052 description: 'C++ bindings for sdbus',
53)