CREATE_PROJECT: Only link to sapi on Windows

This commit is contained in:
SupSuper 2019-12-16 01:03:06 +00:00
parent a29f1fdbb4
commit 316bb297b3

View file

@ -393,13 +393,13 @@ int main(int argc, char *argv[]) {
bool updatesEnabled = false, curlEnabled = false, sdlnetEnabled = false, ttsEnabled = false; bool updatesEnabled = false, curlEnabled = false, sdlnetEnabled = false, ttsEnabled = false;
for (FeatureList::const_iterator i = setup.features.begin(); i != setup.features.end(); ++i) { for (FeatureList::const_iterator i = setup.features.begin(); i != setup.features.end(); ++i) {
if (i->enable) { if (i->enable) {
if (!strcmp(i->name, "updates")) if (!updatesEnabled && !strcmp(i->name, "updates"))
updatesEnabled = true; updatesEnabled = true;
else if (!strcmp(i->name, "libcurl")) else if (!curlEnabled && !strcmp(i->name, "libcurl"))
curlEnabled = true; curlEnabled = true;
else if (!strcmp(i->name, "sdlnet")) else if (!sdlnetEnabled && !strcmp(i->name, "sdlnet"))
sdlnetEnabled = true; sdlnetEnabled = true;
else if (!strcmp(i->name, "tts")) else if (!ttsEnabled && !strcmp(i->name, "tts"))
ttsEnabled = true; ttsEnabled = true;
} }
} }
@ -423,13 +423,12 @@ int main(int argc, char *argv[]) {
if (sdlnetEnabled) { if (sdlnetEnabled) {
setup.libraries.push_back("iphlpapi"); setup.libraries.push_back("iphlpapi");
} }
if (ttsEnabled) {
setup.libraries.push_back("sapi");
}
setup.libraries.push_back("winmm"); setup.libraries.push_back("winmm");
} }
if (ttsEnabled) {
setup.libraries.push_back("sapi");
}
setup.defines.push_back("SDL_BACKEND"); setup.defines.push_back("SDL_BACKEND");
if (!setup.useSDL2) { if (!setup.useSDL2) {
cout << "\nBuilding against SDL 1.2\n\n"; cout << "\nBuilding against SDL 1.2\n\n";
@ -1095,7 +1094,7 @@ const Feature s_features[] = {
{ "langdetect", "USE_DETECTLANG", "", true, "System language detection support" }, // This feature actually depends on "translation", there { "langdetect", "USE_DETECTLANG", "", true, "System language detection support" }, // This feature actually depends on "translation", there
// is just no current way of properly detecting this... // 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", "", true, "Text to speech support"} { "tts", "USE_TTS", "", true, "Text to speech support"}
}; };
const Tool s_tools[] = { const Tool s_tools[] = {