blob: e736633c22d0942bccb0525c9d06f9b775ea69a0 [file] [log] [blame]
William A. Kennington III8ec59e62019-04-03 13:38:17 -07001sdeventplus_deps = [
William A. Kennington IIIa5b752a2019-03-22 19:26:27 -07002 dependency('libsystemd', version: '>=240'),
Patrick Williams02316402022-03-21 11:35:28 -05003 dependency('stdplus'),
William A. Kennington III8ec59e62019-04-03 13:38:17 -07004]
William A. Kennington IIId4b33e92018-12-04 17:22:05 -08005
William A. Kennington III8ec59e62019-04-03 13:38:17 -07006sdeventplus_headers = include_directories('.')
7
8sdeventplus_lib = library(
William A. Kennington IIId4b33e92018-12-04 17:22:05 -08009 'sdeventplus',
10 [
11 'sdeventplus/clock.cpp',
12 'sdeventplus/event.cpp',
13 'sdeventplus/exception.cpp',
14 'sdeventplus/internal/sdevent.cpp',
William A. Kennington IIId4b33e92018-12-04 17:22:05 -080015 '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 III5457dae2019-04-03 03:06:57 -070021 'sdeventplus/utility/timer.cpp',
William A. Kennington IIId4b33e92018-12-04 17:22:05 -080022 ],
William A. Kennington III8ec59e62019-04-03 13:38:17 -070023 include_directories: sdeventplus_headers,
William A. Kennington IIId4b33e92018-12-04 17:22:05 -080024 implicit_include_directories: false,
William A. Kennington III2d8f8cc2019-03-28 03:27:50 -070025 version: meson.project_version(),
William A. Kennington III8ec59e62019-04-03 13:38:17 -070026 dependencies: sdeventplus_deps,
William A. Kennington IIId4b33e92018-12-04 17:22:05 -080027 install: true)
28
Patrick Williamsfc18eb02021-04-15 14:55:58 -050029sdeventplus_dep = declare_dependency(
William A. Kennington III8ec59e62019-04-03 13:38:17 -070030 dependencies: sdeventplus_deps,
31 include_directories: sdeventplus_headers,
32 link_with: sdeventplus_lib)
33
William A. Kennington III05784722020-06-03 00:48:02 -070034sdeventplus_reqs = []
35foreach dep : sdeventplus_deps
36 if dep.type_name() == 'pkgconfig'
William A. Kennington IIIfc1722f2021-04-15 11:58:13 -070037 sdeventplus_reqs += dep
William A. Kennington III05784722020-06-03 00:48:02 -070038 endif
39endforeach
40
William A. Kennington IIId4b33e92018-12-04 17:22:05 -080041import('pkgconfig').generate(
William A. Kennington IIIda476cc2021-04-15 12:08:20 -070042 sdeventplus_lib,
William A. Kennington IIId4b33e92018-12-04 17:22:05 -080043 description: 'C++ systemd event wrapper',
44 version: meson.project_version(),
William A. Kennington III05784722020-06-03 00:48:02 -070045 requires: sdeventplus_reqs)
William A. Kennington IIId4b33e92018-12-04 17:22:05 -080046
47install_headers(
48 'sdeventplus/clock.hpp',
49 'sdeventplus/event.hpp',
50 'sdeventplus/exception.hpp',
William A. Kennington III546fa932020-06-03 14:24:24 -070051 'sdeventplus/types.hpp',
William A. Kennington IIId4b33e92018-12-04 17:22:05 -080052 subdir: 'sdeventplus')
53
54install_headers(
55 'sdeventplus/internal/sdevent.hpp',
William A. Kennington IIId4b33e92018-12-04 17:22:05 -080056 subdir: 'sdeventplus/internal')
57
58install_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
67install_headers(
68 'sdeventplus/test/sdevent.hpp',
69 subdir: 'sdeventplus/test')
70
71install_headers(
72 'sdeventplus/utility/timer.hpp',
William A. Kennington IIIa4c76ea2022-11-21 16:20:41 -080073 'sdeventplus/utility/sdbus.hpp',
William A. Kennington IIId4b33e92018-12-04 17:22:05 -080074 subdir: 'sdeventplus/utility')