Patrick Williams | 98d7108 | 2020-05-15 18:55:16 -0500 | [diff] [blame] | 1 | project('sdbusplus', 'cpp', |
| 2 | default_options: [ |
Patrick Williams | feb4847 | 2020-05-19 06:23:10 -0500 | [diff] [blame] | 3 | 'buildtype=debugoptimized', |
Patrick Williams | 98d7108 | 2020-05-15 18:55:16 -0500 | [diff] [blame] | 4 | 'cpp_std=c++17', |
| 5 | 'werror=true', |
| 6 | ], |
| 7 | version: '1.0.0', |
| 8 | ) |
| 9 | |
| 10 | libsystemd_pkg = dependency('libsystemd') |
| 11 | |
| 12 | libsdbusplus_src = files( |
| 13 | 'sdbusplus/exception.cpp', |
| 14 | 'sdbusplus/sdbus.cpp', |
| 15 | 'sdbusplus/server/transaction.cpp', |
| 16 | ) |
| 17 | |
| 18 | libsdbusplus = shared_library( |
| 19 | 'sdbusplus', |
| 20 | libsdbusplus_src, |
| 21 | dependencies: libsystemd_pkg, |
| 22 | version: meson.project_version(), |
| 23 | install: true, |
| 24 | ) |
| 25 | |
| 26 | install_subdir( |
| 27 | 'sdbusplus', |
| 28 | install_dir: get_option('includedir'), |
| 29 | strip_directory: false, |
| 30 | # TODO (stwcx): Once we remove autotools, we can move these files |
| 31 | # out of the same directory as the headers and remove this. |
| 32 | exclude_files: [ 'exception.cpp', 'sdbus.cpp', 'server/transaction.cpp' ], |
| 33 | ) |
| 34 | |
| 35 | import('pkgconfig').generate( |
| 36 | libraries: libsdbusplus, |
| 37 | name: meson.project_name(), |
| 38 | version: meson.project_version(), |
| 39 | description: 'C++ bindings for sdbus', |
| 40 | ) |