CREATE_PROJECT: Fix MSVC project creation with curl or SDL_Net enabled
This commit is contained in:
parent
1981131f99
commit
990bd641ae
1 changed files with 15 additions and 3 deletions
|
@ -373,11 +373,18 @@ int main(int argc, char *argv[]) {
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool updatesEnabled = false;
|
bool updatesEnabled = false, curlEnabled = false, sdlnetEnabled = 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 && !strcmp(i->name, "updates"))
|
if (i->enable) {
|
||||||
updatesEnabled = true;
|
if (!strcmp(i->name, "updates"))
|
||||||
|
updatesEnabled = true;
|
||||||
|
else if (!strcmp(i->name, "libcurl"))
|
||||||
|
curlEnabled = true;
|
||||||
|
else if (!strcmp(i->name, "sdlnet"))
|
||||||
|
sdlnetEnabled = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (updatesEnabled) {
|
if (updatesEnabled) {
|
||||||
setup.defines.push_back("USE_SPARKLE");
|
setup.defines.push_back("USE_SPARKLE");
|
||||||
if (projectType != kProjectXcode)
|
if (projectType != kProjectXcode)
|
||||||
|
@ -386,6 +393,11 @@ int main(int argc, char *argv[]) {
|
||||||
setup.libraries.push_back("sparkle");
|
setup.libraries.push_back("sparkle");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (curlEnabled && projectType == kProjectMSVC)
|
||||||
|
setup.defines.push_back("CURL_STATICLIB");
|
||||||
|
if (sdlnetEnabled && projectType == kProjectMSVC)
|
||||||
|
setup.libraries.push_back("iphlpapi");
|
||||||
|
|
||||||
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";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue