CREATE_PROJECT: Consistent name for zlib

The feature name didn't match with other code.
This commit is contained in:
Henrik "Henke37" Andersson 2022-01-06 00:53:32 +01:00 committed by Filippos Karapetis
parent ada9bd3098
commit 61e2c5c928
4 changed files with 6 additions and 4 deletions

View File

@ -38,7 +38,7 @@ const CMakeProvider::Library *CMakeProvider::getLibraryFromFeature(const char *f
{ "sdl", "sdl", kSDLVersion1, "FindSDL", "SDL", "SDL_INCLUDE_DIR", "SDL_LIBRARY", nullptr },
{ "sdl", "sdl2", kSDLVersion2, nullptr, "SDL2", nullptr, "SDL2_LIBRARIES", nullptr },
{ "freetype", "freetype2", kSDLVersionAny, "FindFreetype", "Freetype", "FREETYPE_INCLUDE_DIRS", "FREETYPE_LIBRARIES", nullptr },
{ "libz", "zlib", kSDLVersionAny, "FindZLIB", "ZLIB", "ZLIB_INCLUDE_DIRS", "ZLIB_LIBRARIES", nullptr },
{ "zlib", "zlib", kSDLVersionAny, "FindZLIB", "ZLIB", "ZLIB_INCLUDE_DIRS", "ZLIB_LIBRARIES", nullptr },
{ "png", "libpng", kSDLVersionAny, "FindPNG", "PNG", "PNG_INCLUDE_DIRS", "PNG_LIBRARIES", nullptr },
{ "jpeg", "libjpeg", kSDLVersionAny, "FindJPEG", "JPEG", "JPEG_INCLUDE_DIRS", "JPEG_LIBRARIES", nullptr },
{ "mpeg2", "libmpeg2", kSDLVersionAny, "FindMPEG2", "MPEG2", "MPEG2_INCLUDE_DIRS", "MPEG2_mpeg2_LIBRARY", nullptr },

View File

@ -58,8 +58,10 @@ StringList getFeatureLibraries(const BuildSetup &setup) {
for (FeatureList::const_iterator i = setup.features.begin(); i != setup.features.end(); ++i) {
if (i->enable && i->library) {
std::string libname;
if (!std::strcmp(i->name, "libz") || !std::strcmp(i->name, "libcurl")) {
if (!std::strcmp(i->name, "libcurl")) {
libname = i->name;
} else if (!std::strcmp(i->name, "zlib")) {
libname = "libz";
} else if (!std::strcmp(i->name, "vorbis")) {
libname = "libvorbis";
libraries.push_back("libvorbisfile");

View File

@ -1063,7 +1063,7 @@ namespace {
// clang-format off
const Feature s_features[] = {
// Libraries (must be added in generators)
{ "libz", "USE_ZLIB", true, true, "zlib (compression) support" },
{ "zlib", "USE_ZLIB", true, true, "zlib (compression) support" },
{ "mad", "USE_MAD", true, true, "libmad (MP3) support" },
{ "fribidi", "USE_FRIBIDI", true, true, "BiDi support" },
{ "ogg", "USE_OGG", true, true, "Ogg support" },

View File

@ -56,7 +56,7 @@ std::string MSVCProvider::getLibraryFromFeature(const char *feature, const Build
// Libraries
{ "sdl", "SDL.lib", "SDLd.lib", "winmm.lib imm32.lib version.lib setupapi.lib", nullptr },
{ "sdl2", "SDL2.lib", "SDL2d.lib", "winmm.lib imm32.lib version.lib setupapi.lib", nullptr },
{ "libz", "zlib.lib", "zlibd.lib", nullptr, nullptr },
{ "zlib", "zlib.lib", "zlibd.lib", nullptr, nullptr },
{ "mad", "mad.lib", nullptr, nullptr, "libmad.lib" },
{ "fribidi", "fribidi.lib", nullptr, nullptr, nullptr },
{ "ogg", "ogg.lib", nullptr, nullptr, "libogg_static.lib" },