-
Notifications
You must be signed in to change notification settings - Fork 25
/
meson.build
159 lines (137 loc) · 3.58 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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
project('speech-tools', ['cpp', 'c'], version : '2.5.1',
default_options : ['c_std=c99', 'cpp_std=c++11'], meson_version: '>=0.55.0')
PROJECT_NAME = 'Edinburgh Speech Tools Library'
PROJECT_DATE = 'July 2020'
PROJECT_VERSION = meson.project_version()
PROJECT_STATE = 'current'
SYSTEM_TYPE = host_machine.cpu_family() + '_' + host_machine.system()
ESTLIB_SUBDIR = join_paths(get_option('datadir'), meson.project_name())
ESTLIBDIRC = join_paths(get_option('prefix'), ESTLIB_SUBDIR)
SIOD_SUBDIR = join_paths(ESTLIB_SUBDIR, 'siod')
DOCDIR = join_paths(get_option('prefix'), get_option('datadir'), 'doc', meson.project_name())
cc = meson.get_compiler('c')
cxx = meson.get_compiler('cpp')
if cxx.has_argument('-fno-implicit-templates')
add_project_arguments('-fno-implicit-templates', language : 'cpp')
endif
v_array = meson.project_version().split('.')
v_major = v_array[0]
v_minor = v_array[1]
v_patch = v_array[2]
pkg_config_h_subdirs = []
libestbase_conv_libs = []
libestools_conv_libs = []
libestring_conv_libs = []
doc_sources = []
feature_dependencies = {
'scfg': ['siod'],
'ols': ['siod'],
'wagon': ['siod'],
'wfst': ['siod']
}
foreach feature, deplist : feature_dependencies
missing_dep = []
if get_option(feature)
foreach dep : deplist
if not get_option(dep)
missing_dep += dep
endif
endforeach
if missing_dep.length() > 0
error('Feature ' + feature + ' depends on ' + ', '.join(missing_dep) + '. Please enable it')
endif
endif
endforeach
subdir('audio')
subdir('base_class')
subdir('grammar')
subdir('include')
subdir('intonation')
subdir('ling_class')
if get_option('rxp')
subdir('rxp')
endif
subdir('sigpr')
if get_option('siod')
subdir('siod')
endif
subdir('speech_class')
subdir('stats')
subdir('utils')
eststring = library('eststring',
soversion : v_major + '.' + v_minor,
link_whole: libestring_conv_libs,
install: true
)
estbase = library('estbase',
soversion : v_major + '.' + v_minor,
link_whole : libestbase_conv_libs,
link_with: eststring,
install: true
)
estools = library('estools',
soversion : v_major + '.' + v_minor,
link_whole : libestools_conv_libs,
link_with: [estbase, eststring],
install: true
)
subdir('main')
subdir('scripts')
subdir('testsuite')
subdir('lib')
subdir('doc')
pkg = import('pkgconfig')
pkg.generate(
eststring,
name: 'eststring',
description: 'Edinburgh Speech Tools Library (eststring)',
subdirs: pkg_config_h_subdirs,
version: meson.project_version(),
variables:
[
'pkgdatadir=${prefix}/' + ESTLIB_SUBDIR,
'sioddir=${prefix}/' + SIOD_SUBDIR
],
filebase : 'eststring'
)
pkg.generate(
estbase,
name: 'estbase',
description: 'Edinburgh Speech Tools Library (estbase)',
requires: eststring,
subdirs: pkg_config_h_subdirs,
version: meson.project_version(),
variables:
[
'pkgdatadir=${prefix}/' + ESTLIB_SUBDIR,
'sioddir=${prefix}/' + SIOD_SUBDIR
],
filebase : 'estbase'
)
pkg.generate(
estools,
name: 'estools',
description: 'Edinburgh Speech Tools Library (estools)',
requires: [estbase, eststring],
subdirs: pkg_config_h_subdirs,
version: meson.project_version(),
variables:
[
'pkgdatadir=${prefix}/' + ESTLIB_SUBDIR,
'sioddir=${prefix}/' + SIOD_SUBDIR
],
filebase : 'estools'
)
pkg.generate(
name: meson.project_name(),
description: 'Edinburgh Speech Tools Library',
requires: [estools, estbase, eststring],
subdirs: pkg_config_h_subdirs,
version: meson.project_version(),
variables:
[
'pkgdatadir=${prefix}/' + ESTLIB_SUBDIR,
'sioddir=${prefix}/' + SIOD_SUBDIR
],
filebase : meson.project_name()
)