1sdeventplus_deps = [ 2 dependency('libsystemd', version: '>=240'), 3 dependency('stdplus'), 4] 5 6sdeventplus_headers = include_directories('.') 7 8sdeventplus_lib = library( 9 'sdeventplus', 10 [ 11 'sdeventplus/clock.cpp', 12 'sdeventplus/event.cpp', 13 'sdeventplus/exception.cpp', 14 'sdeventplus/internal/sdevent.cpp', 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', 21 'sdeventplus/utility/timer.cpp', 22 ], 23 include_directories: sdeventplus_headers, 24 implicit_include_directories: false, 25 version: meson.project_version(), 26 dependencies: sdeventplus_deps, 27 install: true) 28 29sdeventplus_dep = declare_dependency( 30 dependencies: sdeventplus_deps, 31 include_directories: sdeventplus_headers, 32 link_with: sdeventplus_lib) 33 34sdeventplus_reqs = [] 35foreach dep : sdeventplus_deps 36 if dep.type_name() == 'pkgconfig' 37 sdeventplus_reqs += dep 38 endif 39endforeach 40 41import('pkgconfig').generate( 42 sdeventplus_lib, 43 description: 'C++ systemd event wrapper', 44 version: meson.project_version(), 45 requires: sdeventplus_reqs) 46 47install_headers( 48 'sdeventplus/clock.hpp', 49 'sdeventplus/event.hpp', 50 'sdeventplus/exception.hpp', 51 'sdeventplus/types.hpp', 52 subdir: 'sdeventplus') 53 54install_headers( 55 'sdeventplus/internal/sdevent.hpp', 56 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', 73 subdir: 'sdeventplus/utility') 74