Add support for building with meson

fixes #44
This commit is contained in:
Rasmus Thomsen 2020-03-08 12:40:51 +01:00
parent b43c2d6a8e
commit 0fd4db1067
2 changed files with 48 additions and 0 deletions

15
meson.build Normal file
View file

@ -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')

33
source/ddbus/meson.build Normal file
View file

@ -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',
)