ENH: more efficent fix for bug # 2063

This commit is contained in:
Bill Hoffman 2005-07-22 15:41:23 -04:00
parent 72fdb13652
commit 7041af809d
1 changed files with 6 additions and 4 deletions

View File

@ -889,10 +889,12 @@ void cmLocalVisualStudio7Generator::OutputLibraries(std::ostream& fout,
debugPostfix = m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX"); debugPostfix = m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX");
} }
} }
// since windows is case insensitive then check for lower case .lib as // chop off the last 4 chars of the library string
// at the end of the string, if not yet there add it. std::string lowerCaseLibExt = j->first.substr(j->first.size()-4, 4);
std::string lowerCaseLib = cmSystemTools::LowerCase(j->first); // lower case the extension
if(lowerCaseLib.rfind(".lib") != (lowerCaseLib.size()-4)) lowerCaseLibExt = cmSystemTools::LowerCase(lowerCaseLibExt);
// now check to see if it was a .lib, if not then add a .lib
if(lowerCaseLibExt != ".lib")
{ {
lib += debugPostfix + ".lib"; lib += debugPostfix + ".lib";
} }