From 0fd4db106737e687e494c5401628789cc9766f4f Mon Sep 17 00:00:00 2001 From: Rasmus Thomsen Date: Sun, 8 Mar 2020 12:40:51 +0100 Subject: [PATCH] Add support for building with meson fixes #44 --- meson.build | 15 +++++++++++++++ source/ddbus/meson.build | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 meson.build create mode 100644 source/ddbus/meson.build diff --git a/meson.build b/meson.build new file mode 100644 index 0000000..2235858 --- /dev/null +++ b/meson.build @@ -0,0 +1,15 @@ +project( + 'ddbus', + 'd', + meson_version: '>=0.50', + version: '3.0.0', +) + +src_inc = include_directories('source') + +prefix = get_option('prefix') +include_dir = join_paths(prefix, get_option('includedir'), 'd', 'apk-polkit') + +dbus_dep = dependency('dbus-1') + +subdir('source/ddbus') diff --git a/source/ddbus/meson.build b/source/ddbus/meson.build new file mode 100644 index 0000000..46d66ce --- /dev/null +++ b/source/ddbus/meson.build @@ -0,0 +1,33 @@ +lib_src = [ + 'attributes.d', + 'bus.d', + 'c_lib.d', + 'conv.d', + 'exception.d', + 'package.d', + 'router.d', + 'simple.d', + 'thin.d', + 'util.d', +] + +ddbus_lib = library( + 'ddbus', + lib_src, + version: meson.project_version(), + install: true, + include_directories: src_inc, +) + +pkgc = import('pkgconfig') + +pkgc.generate( + ddbus_lib, + subdirs: 'd/ddbus', + requires: dbus_dep, +) + +install_headers( + lib_src, + subdir: 'd/ddbus/ddbus', +)