Pārlūkot izejas kodu

ENH: fix lib case bug correctly

Bill Hoffman 20 gadi atpakaļ
vecāks
revīzija
6a73e8ac69
1 mainītis faili ar 11 papildinājumiem un 1 dzēšanām
  1. 11 1
      Source/cmLocalVisualStudio7Generator.cxx

+ 11 - 1
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";
         }