Selaa lähdekoodia

BUG: get correct library name

Bill Hoffman 24 vuotta sitten
vanhempi
sitoutus
9ae8234fe5
2 muutettua tiedostoa jossa 8 lisäystä ja 4 poistoa
  1. 6 2
      Source/cmSystemTools.cxx
  2. 2 2
      Source/cmUnixMakefileGenerator.cxx

+ 6 - 2
Source/cmSystemTools.cxx

@@ -1199,10 +1199,14 @@ std::string cmSystemTools::CollapseFullPath(const char* in_name)
 # ifdef MAXPATHLEN
   char resolved_name[MAXPATHLEN];
 # else
+#  ifdef PATH_MAX
   char resolved_name[PATH_MAX];
+#  else
+  char resolved_name[5024];
+#  endif
 # endif
-   realpath(in_name, resolved_name);
-   return resolved_name;
+  realpath(in_name, resolved_name);
+  return resolved_name;
 #endif
 }
 

+ 2 - 2
Source/cmUnixMakefileGenerator.cxx

@@ -450,8 +450,8 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
           runtimeDirs.push_back( libpath );
           }
         }
-      cmRegularExpression libname("lib([^.]*)\\.(.*)");
-      cmRegularExpression libname_noprefix("([^.]*)\\.(.*)");
+      cmRegularExpression libname("lib(.*)(\\.so|\\.sl|\\.a|\\.dylib).*");
+      cmRegularExpression libname_noprefix("(.*)(\\.so|\\.sl|\\.a|\\.dylib).*");
       if(libname.find(file))
         {
         librariesLinked += "-l";