From e965df1e8830c994da959ceaeb153d85fae7b859 Mon Sep 17 00:00:00 2001 From: Jaromir Wysoglad Date: Sat, 27 Jul 2019 01:06:35 +0200 Subject: TTS: Add TTS support when compiling with msvc. --- devtools/create_project/create_project.cpp | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'devtools/create_project') diff --git a/devtools/create_project/create_project.cpp b/devtools/create_project/create_project.cpp index 4f178c9cdd..9599aa04d4 100644 --- a/devtools/create_project/create_project.cpp +++ b/devtools/create_project/create_project.cpp @@ -390,7 +390,7 @@ int main(int argc, char *argv[]) { #endif } - bool updatesEnabled = false, curlEnabled = false, sdlnetEnabled = false; + bool updatesEnabled = false, curlEnabled = false, sdlnetEnabled = false, ttsEnabled = false; for (FeatureList::const_iterator i = setup.features.begin(); i != setup.features.end(); ++i) { if (i->enable) { if (!strcmp(i->name, "updates")) @@ -399,6 +399,8 @@ int main(int argc, char *argv[]) { curlEnabled = true; else if (!strcmp(i->name, "sdlnet")) sdlnetEnabled = true; + else if (!strcmp(i->name, "tts")) + ttsEnabled = true; } } @@ -424,6 +426,11 @@ int main(int argc, char *argv[]) { setup.libraries.push_back("winmm"); } + if (ttsEnabled) { + setup.libraries.push_back("sapi"); + setup.defines.push_back("USE_WINDOWS_TTS"); + } + setup.defines.push_back("SDL_BACKEND"); if (!setup.useSDL2) { cout << "\nBuilding against SDL 1.2\n\n"; @@ -1088,7 +1095,8 @@ const Feature s_features[] = { { "dialogs", "USE_SYSDIALOGS", "", true, "System dialogs support"}, { "langdetect", "USE_DETECTLANG", "", true, "System language detection support" }, // This feature actually depends on "translation", there // is just no current way of properly detecting this... - { "text-console", "USE_TEXT_CONSOLE_FOR_DEBUGGER", "", false, "Text console debugger" } // This feature is always applied in xcode projects + { "text-console", "USE_TEXT_CONSOLE_FOR_DEBUGGER", "", false, "Text console debugger" }, // This feature is always applied in xcode projects + { "tts", "USE_TTS", "", false, "Text to speech support"} }; const Tool s_tools[] = { -- cgit v1.2.3