BUG: get correct library name

This commit is contained in:
Bill Hoffman 2001-09-28 10:40:14 -04:00
parent d9e38b32c3
commit 9ae8234fe5
2 changed files with 8 additions and 4 deletions

View File

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

View File

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