forked from gedaiu/fluent-asserts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
meson.build
76 lines (68 loc) · 1.89 KB
/
meson.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
project('fluent-asserts', 'd',
meson_version: '>=0.42',
license: 'MIT',
version: '0.6.7'
)
project_soversion = '0'
#
# Dependencies
#
pkgc = import('pkgconfig')
ddmp_dep = dependency('ddmp', version: '>= 0.0.1', fallback: ['ddmp', 'ddmp_dep'])
#
# Sources
#
fluent_asserts_src = [
'source/fluent/asserts.d',
'core/fluentasserts/core/array.d',
'core/fluentasserts/core/base.d',
'core/fluentasserts/core/basetype.d',
'core/fluentasserts/core/callable.d',
'core/fluentasserts/core/objects.d',
'core/fluentasserts/core/results.d',
'core/fluentasserts/core/string.d'
]
core_src_dir = include_directories('core/')
src_dir = include_directories('source/')
#
# Targets
#
fluent_asserts_lib = library('fluent-asserts',
[fluent_asserts_src],
include_directories: [core_src_dir],
dependencies: [ddmp_dep],
install: true,
version: meson.project_version(),
soversion: project_soversion
)
pkgc.generate(name: 'fluent-asserts',
libraries: fluent_asserts_lib,
subdirs: 'd/fluentasserts',
version: meson.project_version(),
requires: 'ddmp',
description: 'DLang fluent assertions done right.'
)
# to allow others to easily use this as a subproject
fluentasserts_dep = declare_dependency(
link_with: [fluent_asserts_lib],
include_directories: [core_src_dir, src_dir],
dependencies: [ddmp_dep]
)
#
# Tests
#
fluent_asserts_test_exe = executable('fluentasserts-test',
[fluent_asserts_src, 'test/emptymain.d'],
include_directories: [core_src_dir, src_dir],
dependencies: [ddmp_dep],
d_unittest: true
)
test('fluentasserts-test',
fluent_asserts_test_exe,
workdir: meson.source_root()
)
#
# Install
#
install_subdir('core/fluentasserts/', install_dir: 'include/d/fluentasserts/')
install_subdir('source/fluent/', install_dir: 'include/d/fluentasserts/')