BUG: Fixed logic that splits a full path library link into the -L and -l pieces to not write out a -l by itself if the file regular expression does not match.
This commit is contained in:
parent
f190cb8dc2
commit
c60696ccaf
|
@ -292,14 +292,14 @@ void cmUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
|
||||||
linkLibs += libpath;
|
linkLibs += libpath;
|
||||||
linkLibs += " ";
|
linkLibs += " ";
|
||||||
}
|
}
|
||||||
librariesLinked += "-l";
|
|
||||||
cmRegularExpression libname("lib(.*)\\.(.*)");
|
cmRegularExpression libname("lib(.*)\\.(.*)");
|
||||||
if(libname.find(file))
|
if(libname.find(file))
|
||||||
{
|
{
|
||||||
|
librariesLinked += "-l";
|
||||||
file = libname.match(1);
|
file = libname.match(1);
|
||||||
|
librariesLinked += file;
|
||||||
|
librariesLinked += " ";
|
||||||
}
|
}
|
||||||
librariesLinked += file;
|
|
||||||
librariesLinked += " ";
|
|
||||||
}
|
}
|
||||||
// not a full path, so add -l name
|
// not a full path, so add -l name
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue