1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-13 13:31:48 +00:00

Backport text-to-speech support.

This commit is contained in:
bruvzg
2022-05-23 15:02:12 +03:00
parent 2882eaab28
commit 6489fe890e
45 changed files with 3905 additions and 2 deletions

View File

@@ -74,6 +74,7 @@ def get_opts():
BoolVariable("use_tsan", "Use LLVM/GCC compiler thread sanitizer (TSAN))", False),
BoolVariable("use_msan", "Use LLVM/GCC compiler memory sanitizer (MSAN))", False),
BoolVariable("pulseaudio", "Detect and use PulseAudio", True),
BoolVariable("speechd", "Detect and use Speech Dispatcher for Text-to-Speech support", True),
BoolVariable("udev", "Use udev for gamepad connection callbacks", True),
BoolVariable("debug_symbols", "Add debugging symbols to release/release_debug builds", True),
BoolVariable("separate_debug_symbols", "Create a separate file containing debugging symbols", False),
@@ -347,6 +348,13 @@ def configure(env):
else:
print("Warning: PulseAudio development libraries not found. Disabling the PulseAudio audio driver.")
if env["speechd"]:
if os.system("pkg-config --exists speech-dispatcher") == 0: # 0 means found
env.Append(CPPDEFINES=["SPEECHD_ENABLED"])
env.ParseConfig("pkg-config speech-dispatcher --cflags") # Only cflags, we dlopen the library.
else:
print("Warning: Speech Dispatcher development libraries not found. Disabling Text-to-Speech support.")
if platform.system() == "Linux":
env.Append(CPPDEFINES=["JOYDEV_ENABLED"])
if env["udev"]: