This repository has been archived by the owner on May 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
/
meson.build
99 lines (96 loc) · 2.22 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
project(
'libgdtts',
'cpp',
meson_version : '>= 0.45'
)
library_version = '0.2.0'
prefix = ''
cpp_args = []
link_args = []
dependencies = []
sources = [
'src/array.cpp',
'src/dictionary.cpp',
'src/gdnative.cpp',
'src/tts_driver.cpp',
'src/ustring.cpp',
'src/variant.cpp'
]
if host_machine.system() == 'darwin'
add_languages('objcpp')
sources += [
'src/tts_nsspeech/tts_nsspeech.mm'
]
cpp_args += [
'-DOS_MACOS',
'-std=c++14',
'-Wwrite-strings',
]
link_args += [
'-framework', 'Foundation',
'-framework', 'Appkit',
'-framework', 'Cocoa',
'-Wl,-undefined,dynamic_lookup',
]
elif host_machine.system() == 'linux'
dependencies += dependency('speech-dispatcher', required: true)
sources += [
'src/tts_libspeechd/tts_libspeechd.cpp'
]
cpp_args += [
'-DOS_LINUX',
'-std=c++14',
'-fPIC',
'-Wwrite-strings',
'-Wno-attributes'
]
link_args += [
'-static-libgcc',
'-static-libstdc++',
'-Wl,--no-undefined',
'-Wl,-R,\'\$ORIGIN\'',
]
elif host_machine.system() == 'windows'
sources += [
'src/tts_sapi/tts_sapi.cpp'
]
if meson.get_compiler('cpp').get_id() == 'msvc'
prefix = 'lib'
cpp_args += [
'/TP'
]
link_args += [
'/WX',
'kernel32.lib',
'ole32.lib',
'oleaut32.lib',
'sapi.lib'
]
else
cpp_args += [
'-DOS_WINDOWS',
'-std=c++14',
'-Wwrite-strings',
]
link_args += [
'-lkernel32',
'-lole32',
'-loleaut32',
'-lsapi',
'--static',
'-static-libgcc',
'-static-libstdc++',
'-Wl,--no-undefined',
]
endif
else
error('Text-to-speech is not implemented on this platform!')
endif
shared_library(
prefix + 'gdtts' + '.' + target_machine.system() + '.' + target_machine.cpu_family(),
sources,
dependencies : dependencies,
link_args : link_args,
cpp_args : cpp_args,
include_directories : include_directories('src', 'godot_headers')
)