From f7ca7fb868f8ec6e24b6a8b4753f61e5588624bc Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 10 Jul 2001 13:57:35 -0400 Subject: [PATCH] BUG: When splitting a full path library into separate -L and -l parts, the -l part may not have a "lib" prefix on cygwin. --- Source/cmUnixMakefileGenerator.cxx | 8 ++++++++ 1 file changed, 8 insertions(+) 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