BUG: FindLibrary should not accept a directory even if the exact specified name exists.
This commit is contained in:
parent
229355764b
commit
d9cda28701
|
@ -1626,11 +1626,12 @@ std::string cmSystemTools::FindLibrary(const char* name,
|
||||||
const std::vector<std::string>& userPaths)
|
const std::vector<std::string>& userPaths)
|
||||||
{
|
{
|
||||||
// See if the executable exists as written.
|
// See if the executable exists as written.
|
||||||
if(cmSystemTools::FileExists(name))
|
if(cmSystemTools::FileExists(name) &&
|
||||||
|
!cmSystemTools::FileIsDirectory(name))
|
||||||
{
|
{
|
||||||
return cmSystemTools::CollapseFullPath(name);
|
return cmSystemTools::CollapseFullPath(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Add the system search path to our path.
|
// Add the system search path to our path.
|
||||||
std::vector<std::string> path = userPaths;
|
std::vector<std::string> path = userPaths;
|
||||||
cmSystemTools::GetPath(path);
|
cmSystemTools::GetPath(path);
|
||||||
|
|
Loading…
Reference in New Issue