ENH: Make find_library test for the library file as named before trying prefixes and suffixes. This will allow users to explicitly search for static libraries on unix. See bug #1643.
This commit is contained in:
parent
a5074872b0
commit
d9b9720167
|
@ -263,6 +263,16 @@ std::string cmFindLibraryCommand::FindLibrary(const char* name)
|
||||||
}
|
}
|
||||||
if(!onlyFrameworks)
|
if(!onlyFrameworks)
|
||||||
{
|
{
|
||||||
|
// Try the original library name as specified by the user.
|
||||||
|
tryPath = *p;
|
||||||
|
tryPath += name;
|
||||||
|
if(cmSystemTools::FileExists(tryPath.c_str(), true))
|
||||||
|
{
|
||||||
|
tryPath = cmSystemTools::CollapseFullPath(tryPath.c_str());
|
||||||
|
cmSystemTools::ConvertToUnixSlashes(tryPath);
|
||||||
|
return tryPath;
|
||||||
|
}
|
||||||
|
|
||||||
// Try various library naming conventions.
|
// Try various library naming conventions.
|
||||||
for(std::vector<std::string>::iterator prefix = prefixes.begin();
|
for(std::vector<std::string>::iterator prefix = prefixes.begin();
|
||||||
prefix != prefixes.end(); ++prefix)
|
prefix != prefixes.end(); ++prefix)
|
||||||
|
|
Loading…
Reference in New Issue