Patrick Williams | ad145e0 | 2020-05-19 16:45:15 -0500 | [diff] [blame] | 1 | project('sdbusplus', 'cpp', 'c', |
Patrick Williams | 98d7108 | 2020-05-15 18:55:16 -0500 | [diff] [blame] | 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') |
Patrick Williams | 7f66425 | 2020-06-04 10:20:56 -0500 | [diff] [blame] | 11 | root_inc = include_directories('include') |
Patrick Williams | 98d7108 | 2020-05-15 18:55:16 -0500 | [diff] [blame] | 12 | |
| 13 | libsdbusplus_src = files( |
Patrick Williams | 7f66425 | 2020-06-04 10:20:56 -0500 | [diff] [blame] | 14 | 'src/exception.cpp', |
| 15 | 'src/sdbus.cpp', |
| 16 | 'src/server/transaction.cpp', |
Patrick Williams | 98d7108 | 2020-05-15 18:55:16 -0500 | [diff] [blame] | 17 | ) |
| 18 | |
William A. Kennington III | f69a8b7 | 2020-05-28 12:59:40 -0700 | [diff] [blame] | 19 | libsdbusplus = library( |
Patrick Williams | 98d7108 | 2020-05-15 18:55:16 -0500 | [diff] [blame] | 20 | 'sdbusplus', |
| 21 | libsdbusplus_src, |
Patrick Williams | 7f66425 | 2020-06-04 10:20:56 -0500 | [diff] [blame] | 22 | include_directories: root_inc, |
Patrick Williams | 98d7108 | 2020-05-15 18:55:16 -0500 | [diff] [blame] | 23 | dependencies: libsystemd_pkg, |
| 24 | version: meson.project_version(), |
| 25 | install: true, |
| 26 | ) |
| 27 | |
Patrick Williams | d0285b9 | 2020-06-01 09:43:47 -0500 | [diff] [blame] | 28 | sdbusplus_dep = declare_dependency( |
| 29 | include_directories: root_inc, |
| 30 | link_with: libsdbusplus, |
| 31 | dependencies: libsystemd_pkg |
| 32 | ) |
| 33 | |
Patrick Williams | ad145e0 | 2020-05-19 16:45:15 -0500 | [diff] [blame] | 34 | subdir('tools') |
| 35 | |
Patrick Williams | ad145e0 | 2020-05-19 16:45:15 -0500 | [diff] [blame] | 36 | pthread_dep = dependency('threads') |
| 37 | |
| 38 | subdir('example') |
| 39 | subdir('test') |
| 40 | |
Patrick Williams | 98d7108 | 2020-05-15 18:55:16 -0500 | [diff] [blame] | 41 | install_subdir( |
Patrick Williams | 7f66425 | 2020-06-04 10:20:56 -0500 | [diff] [blame] | 42 | 'include/sdbusplus', |
Patrick Williams | 98d7108 | 2020-05-15 18:55:16 -0500 | [diff] [blame] | 43 | install_dir: get_option('includedir'), |
| 44 | strip_directory: false, |
Patrick Williams | 98d7108 | 2020-05-15 18:55:16 -0500 | [diff] [blame] | 45 | ) |
| 46 | |
| 47 | import('pkgconfig').generate( |
| 48 | libraries: libsdbusplus, |
| 49 | name: meson.project_name(), |
| 50 | version: meson.project_version(), |
Patrick Williams | fa3137a | 2020-05-28 14:49:15 -0500 | [diff] [blame] | 51 | requires: libsystemd_pkg, |
Patrick Williams | 98d7108 | 2020-05-15 18:55:16 -0500 | [diff] [blame] | 52 | description: 'C++ bindings for sdbus', |
| 53 | ) |