forked from denizzzka/dpq2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmeson.build
69 lines (62 loc) · 1.73 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
project('DPQ2', 'd',
meson_version: '>=0.40',
license: 'BSL-1.0',
version: '0.6.24'
)
project_soversion = '0'
#
# Dependencies
#
pkgc = import('pkgconfig')
derelict_pq_dep = dependency('derelict-pq', version: '>= 2.2.0', fallback: ['derelict-pq', 'derelict_pq_dep'])
vibe_data_dep = dependency('vibe-data', version: '>= 0.8')
#
# Sources
#
dpq2_src = [
'src/dpq2/connection.d',
'src/dpq2/value.d',
'src/dpq2/oids.d',
'src/dpq2/args.d',
'src/dpq2/conv/numeric.d',
'src/dpq2/conv/jsonb.d',
'src/dpq2/conv/time.d',
'src/dpq2/conv/to_bson.d',
'src/dpq2/conv/to_d_types.d',
'src/dpq2/conv/from_bson.d',
'src/dpq2/conv/from_d_types.d',
'src/dpq2/exception.d',
'src/dpq2/package.d',
'src/dpq2/result.d',
'src/dpq2/query.d'
]
src_dir = include_directories('src/')
#
# Targets
#
dpq2_lib = library('dpq2',
[dpq2_src],
include_directories: [src_dir],
dependencies: [derelict_pq_dep, vibe_data_dep],
install: true,
version: meson.project_version(),
soversion: project_soversion,
d_args: ['-d-version=Derelict_Static', '-d-version=Have_Int64_TimeStamp']
)
pkgc.generate(name: 'dpq2',
libraries: dpq2_lib,
subdirs: 'd/dpq2',
version: meson.project_version(),
requires: ['derelict-pq', 'vibe-data'],
description: 'Another attempt to create a good interface to PostgreSQL for the D programming language.'
)
# to allow others to easily use this as a subproject
dpq2_dep = declare_dependency(
link_with: [dpq2_lib],
include_directories: [src_dir],
dependencies: [derelict_pq_dep, vibe_data_dep]
)
#
# Install
#
install_subdir('src/dpq2/', install_dir: 'include/d/dpq2/')