Fix regular expressions to be able to handle windows libraries

This commit is contained in:
Andy Cedilnik 2002-11-11 13:15:52 -05:00
parent d1051bb575
commit b7701cfa1a
1 changed files with 3 additions and 2 deletions

View File

@ -559,8 +559,9 @@ void cmLocalUnixMakefileGenerator::OutputLinkLibraries(std::ostream& fout,
} }
} }
cmRegularExpression reg(regexp.c_str()); cmRegularExpression reg(regexp.c_str());
cmRegularExpression libname("lib(.*)(\\.so|\\.sl|\\.a|\\.dylib).*"); cmRegularExpression libname("lib([^/]*)(\\.so|\\.lib|\\.dll|\\.sl|\\.a|\\.dylib).*");
cmRegularExpression libname_noprefix("(.*)(\\.so|\\.sl|\\.a|\\.dylib).*"); cmRegularExpression libname_noprefix("([^/]*)(\\.so|\\.lib|\\.dll|\\.sl|\\.a|\\.dylib).*");
if(libname.find(file)) if(libname.find(file))
{ {
librariesLinked += libLinkFlag; librariesLinked += libLinkFlag;