From 6a73e8ac695a9dc1ac86c2fd4f1fc6b5e46ad4d0 Mon Sep 17 00:00:00 2001 From: Bill Hoffman Date: Mon, 25 Jul 2005 16:10:08 -0400 Subject: ENH: fix lib case bug correctly --- Source/cmLocalVisualStudio7Generator.cxx | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Source/cmLocalVisualStudio7Generator.cxx b/Source/cmLocalVisualStudio7Generator.cxx index 52cccfd..a583613 100644 --- a/Source/cmLocalVisualStudio7Generator.cxx +++ b/Source/cmLocalVisualStudio7Generator.cxx @@ -888,8 +888,18 @@ void cmLocalVisualStudio7Generator::OutputLibraries(std::ostream& fout, { debugPostfix = m_Makefile->GetDefinition("CMAKE_DEBUG_POSTFIX"); } + } + // chop off the last 4 chars of the library string + + std::string lowerCaseLibExt = j->first; + if(lowerCaseLibExt.size() > 4) + { + lowerCaseLibExt = j->first.substr(j->first.size()-4, 4); } - if(j->first.find(".lib") == std::string::npos) + // lower case the extension + 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"; } -- cgit v0.12