BUG: When splitting a full path library into separate -L and -l parts, the -l part may not have a "lib" prefix on cygwin.

This commit is contained in:
Brad King 2001-07-10 13:57:35 -04:00
parent fdd48818db
commit f7ca7fb868

View File

@ -426,6 +426,7 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
}
}
cmRegularExpression libname("lib(.*)\\.(.*)");
cmRegularExpression libname_noprefix("(.*)\\.(.*)");
if(libname.find(file))
{
librariesLinked += "-l";
@ -433,6 +434,13 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
librariesLinked += file;
librariesLinked += " ";
}
else if(libname_noprefix.find(file))
{
librariesLinked += "-l";
file = libname_noprefix.match(1);
librariesLinked += file;
librariesLinked += " ";
}
}
// not a full path, so add -l name
else