-
Notifications
You must be signed in to change notification settings - Fork 25
/
meson.build
66 lines (57 loc) · 1.33 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
project('Diet-NG', 'd',
meson_version: '>=0.40',
license: 'MIT',
version: '1.7.4'
)
project_soversion = '0'
project_version = meson.project_version()
pkgc = import('pkgconfig')
#
# Sources
#
diet_src = [
'source/diet/defs.d',
'source/diet/dom.d',
'source/diet/html.d',
'source/diet/input.d',
'source/diet/internal/html.d',
'source/diet/internal/string.d',
'source/diet/parser.d',
'source/diet/traits.d',
]
src_dir = include_directories('source/')
#
# Targets
#
diet_lib = library('diet',
[diet_src],
include_directories: [src_dir],
install: true,
version: project_version,
soversion: project_soversion
)
pkgc.generate(name: 'diet',
libraries: [diet_lib],
subdirs: 'd/diet',
version: project_version,
description: 'Next generation Diet template compiler.'
)
# for use by Vibe.d and others which embed this as subproject
diet_dep = declare_dependency(
link_with: [diet_lib],
include_directories: [src_dir]
)
#
# Tests
#
diet_test_exe = executable('test_diet',
[diet_src],
include_directories: [src_dir],
d_args: meson.get_compiler('d').unittest_args(),
link_args: '-main'
)
test('test_diet', diet_test_exe)
#
# Install
#
install_subdir('source/diet/', install_dir: 'include/d/diet/')