William A. Kennington III | 8ec59e6 | 2019-04-03 13:38:17 -0700 | [diff] [blame] | 1 | sdeventplus_deps = [ |
William A. Kennington III | a5b752a | 2019-03-22 19:26:27 -0700 | [diff] [blame] | 2 | dependency('libsystemd', version: '>=240'), |
Patrick Williams | 0231640 | 2022-03-21 11:35:28 -0500 | [diff] [blame] | 3 | dependency('stdplus'), |
William A. Kennington III | 8ec59e6 | 2019-04-03 13:38:17 -0700 | [diff] [blame] | 4 | ] |
William A. Kennington III | d4b33e9 | 2018-12-04 17:22:05 -0800 | [diff] [blame] | 5 | |
William A. Kennington III | 8ec59e6 | 2019-04-03 13:38:17 -0700 | [diff] [blame] | 6 | sdeventplus_headers = include_directories('.') |
| 7 | |
| 8 | sdeventplus_lib = library( |
William A. Kennington III | d4b33e9 | 2018-12-04 17:22:05 -0800 | [diff] [blame] | 9 | 'sdeventplus', |
| 10 | [ |
| 11 | 'sdeventplus/clock.cpp', |
| 12 | 'sdeventplus/event.cpp', |
| 13 | 'sdeventplus/exception.cpp', |
| 14 | 'sdeventplus/internal/sdevent.cpp', |
William A. Kennington III | d4b33e9 | 2018-12-04 17:22:05 -0800 | [diff] [blame] | 15 | 'sdeventplus/source/base.cpp', |
| 16 | 'sdeventplus/source/child.cpp', |
| 17 | 'sdeventplus/source/event.cpp', |
| 18 | 'sdeventplus/source/io.cpp', |
| 19 | 'sdeventplus/source/signal.cpp', |
| 20 | 'sdeventplus/source/time.cpp', |
William A. Kennington III | 5457dae | 2019-04-03 03:06:57 -0700 | [diff] [blame] | 21 | 'sdeventplus/utility/timer.cpp', |
William A. Kennington III | d4b33e9 | 2018-12-04 17:22:05 -0800 | [diff] [blame] | 22 | ], |
William A. Kennington III | 8ec59e6 | 2019-04-03 13:38:17 -0700 | [diff] [blame] | 23 | include_directories: sdeventplus_headers, |
William A. Kennington III | d4b33e9 | 2018-12-04 17:22:05 -0800 | [diff] [blame] | 24 | implicit_include_directories: false, |
William A. Kennington III | 2d8f8cc | 2019-03-28 03:27:50 -0700 | [diff] [blame] | 25 | version: meson.project_version(), |
William A. Kennington III | 8ec59e6 | 2019-04-03 13:38:17 -0700 | [diff] [blame] | 26 | dependencies: sdeventplus_deps, |
William A. Kennington III | d4b33e9 | 2018-12-04 17:22:05 -0800 | [diff] [blame] | 27 | install: true) |
| 28 | |
Patrick Williams | fc18eb0 | 2021-04-15 14:55:58 -0500 | [diff] [blame] | 29 | sdeventplus_dep = declare_dependency( |
William A. Kennington III | 8ec59e6 | 2019-04-03 13:38:17 -0700 | [diff] [blame] | 30 | dependencies: sdeventplus_deps, |
| 31 | include_directories: sdeventplus_headers, |
| 32 | link_with: sdeventplus_lib) |
| 33 | |
William A. Kennington III | 0578472 | 2020-06-03 00:48:02 -0700 | [diff] [blame] | 34 | sdeventplus_reqs = [] |
| 35 | foreach dep : sdeventplus_deps |
| 36 | if dep.type_name() == 'pkgconfig' |
William A. Kennington III | fc1722f | 2021-04-15 11:58:13 -0700 | [diff] [blame] | 37 | sdeventplus_reqs += dep |
William A. Kennington III | 0578472 | 2020-06-03 00:48:02 -0700 | [diff] [blame] | 38 | endif |
| 39 | endforeach |
| 40 | |
William A. Kennington III | d4b33e9 | 2018-12-04 17:22:05 -0800 | [diff] [blame] | 41 | import('pkgconfig').generate( |
William A. Kennington III | da476cc | 2021-04-15 12:08:20 -0700 | [diff] [blame] | 42 | sdeventplus_lib, |
William A. Kennington III | d4b33e9 | 2018-12-04 17:22:05 -0800 | [diff] [blame] | 43 | description: 'C++ systemd event wrapper', |
| 44 | version: meson.project_version(), |
William A. Kennington III | 0578472 | 2020-06-03 00:48:02 -0700 | [diff] [blame] | 45 | requires: sdeventplus_reqs) |
William A. Kennington III | d4b33e9 | 2018-12-04 17:22:05 -0800 | [diff] [blame] | 46 | |
| 47 | install_headers( |
| 48 | 'sdeventplus/clock.hpp', |
| 49 | 'sdeventplus/event.hpp', |
| 50 | 'sdeventplus/exception.hpp', |
William A. Kennington III | 546fa93 | 2020-06-03 14:24:24 -0700 | [diff] [blame] | 51 | 'sdeventplus/types.hpp', |
William A. Kennington III | d4b33e9 | 2018-12-04 17:22:05 -0800 | [diff] [blame] | 52 | subdir: 'sdeventplus') |
| 53 | |
| 54 | install_headers( |
| 55 | 'sdeventplus/internal/sdevent.hpp', |
William A. Kennington III | d4b33e9 | 2018-12-04 17:22:05 -0800 | [diff] [blame] | 56 | subdir: 'sdeventplus/internal') |
| 57 | |
| 58 | install_headers( |
| 59 | 'sdeventplus/source/base.hpp', |
| 60 | 'sdeventplus/source/child.hpp', |
| 61 | 'sdeventplus/source/event.hpp', |
| 62 | 'sdeventplus/source/io.hpp', |
| 63 | 'sdeventplus/source/signal.hpp', |
| 64 | 'sdeventplus/source/time.hpp', |
| 65 | subdir: 'sdeventplus/source') |
| 66 | |
| 67 | install_headers( |
| 68 | 'sdeventplus/test/sdevent.hpp', |
| 69 | subdir: 'sdeventplus/test') |
| 70 | |
| 71 | install_headers( |
| 72 | 'sdeventplus/utility/timer.hpp', |
| 73 | subdir: 'sdeventplus/utility') |