blob: 1a48479d4ca231c0575731d1d6762074d79557e1 [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',
William A. Kennington IIIf05b4ca2020-06-04 02:48:52 -07006 'tests=' + (meson.is_subproject() ? 'disabled' : 'auto'),
7 'examples=' + (meson.is_subproject() ? 'disabled' : 'auto'),
Patrick Williams98d71082020-05-15 18:55:16 -05008 ],
9 version: '1.0.0',
William A. Kennington IIIadf03542020-06-04 03:01:11 -070010 meson_version: '>=0.53.2',
Patrick Williams98d71082020-05-15 18:55:16 -050011)
12
13libsystemd_pkg = dependency('libsystemd')
Patrick Williams7f664252020-06-04 10:20:56 -050014root_inc = include_directories('include')
Patrick Williams98d71082020-05-15 18:55:16 -050015
16libsdbusplus_src = files(
Patrick Williams7f664252020-06-04 10:20:56 -050017 'src/exception.cpp',
Patrick Williams32ffb032020-10-12 12:17:48 -050018 'src/bus.cpp',
Patrick Williams7f664252020-06-04 10:20:56 -050019 'src/sdbus.cpp',
Patrick Williams32ffb032020-10-12 12:17:48 -050020 'src/server/interface.cpp',
Patrick Williams7f664252020-06-04 10:20:56 -050021 'src/server/transaction.cpp',
Patrick Williams98d71082020-05-15 18:55:16 -050022)
23
William A. Kennington IIIf69a8b72020-05-28 12:59:40 -070024libsdbusplus = library(
Patrick Williams98d71082020-05-15 18:55:16 -050025 'sdbusplus',
26 libsdbusplus_src,
Patrick Williams7f664252020-06-04 10:20:56 -050027 include_directories: root_inc,
Patrick Williams98d71082020-05-15 18:55:16 -050028 dependencies: libsystemd_pkg,
29 version: meson.project_version(),
30 install: true,
31)
32
Patrick Williamsd0285b92020-06-01 09:43:47 -050033sdbusplus_dep = declare_dependency(
34 include_directories: root_inc,
35 link_with: libsdbusplus,
36 dependencies: libsystemd_pkg
37)
38
Patrick Williamsad145e02020-05-19 16:45:15 -050039subdir('tools')
40
Patrick Williams3a6d5842020-06-09 14:59:58 -050041boost_dep = dependency(
42 'boost',
43 disabler: true,
44 required: false,
Patrick Williams3f90a142020-06-09 15:44:13 -050045 modules: [ 'coroutine', 'context' ],
Patrick Williams3a6d5842020-06-09 14:59:58 -050046)
Patrick Williamsad145e02020-05-19 16:45:15 -050047
William A. Kennington III5e893b92020-06-04 02:47:29 -070048if not get_option('examples').disabled()
49 subdir('example')
50endif
51if not get_option('tests').disabled()
52 subdir('test')
53endif
Patrick Williamsad145e02020-05-19 16:45:15 -050054
Patrick Williams98d71082020-05-15 18:55:16 -050055install_subdir(
Patrick Williams7f664252020-06-04 10:20:56 -050056 'include/sdbusplus',
Patrick Williams98d71082020-05-15 18:55:16 -050057 install_dir: get_option('includedir'),
58 strip_directory: false,
Patrick Williams98d71082020-05-15 18:55:16 -050059)
60
61import('pkgconfig').generate(
62 libraries: libsdbusplus,
63 name: meson.project_name(),
64 version: meson.project_version(),
Patrick Williamsfa3137a2020-05-28 14:49:15 -050065 requires: libsystemd_pkg,
Patrick Williams98d71082020-05-15 18:55:16 -050066 description: 'C++ bindings for sdbus',
67)