diff --git a/Source/cmUnixMakefileGenerator.cxx b/Source/cmUnixMakefileGenerator.cxx index e1d1055cbb..dc80bf816f 100644 --- a/Source/cmUnixMakefileGenerator.cxx +++ b/Source/cmUnixMakefileGenerator.cxx @@ -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