diff options
author | Brad King <brad.king@kitware.com> | 2003-03-13 13:44:38 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-03-13 13:44:38 (GMT) |
commit | d9cda2870181cf25a4234d1d8d99a0c8cc457927 (patch) | |
tree | 6b539e46589a899fd04d23b8b9c28507926ea849 | |
parent | 229355764bf95245757a7b469a92df31a8f3ca76 (diff) | |
download | CMake-d9cda2870181cf25a4234d1d8d99a0c8cc457927.zip CMake-d9cda2870181cf25a4234d1d8d99a0c8cc457927.tar.gz CMake-d9cda2870181cf25a4234d1d8d99a0c8cc457927.tar.bz2 |
BUG: FindLibrary should not accept a directory even if the exact specified name exists.
-rw-r--r-- | Source/cmSystemTools.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Source/cmSystemTools.cxx b/Source/cmSystemTools.cxx index 39af754..0b32313 100644 --- a/Source/cmSystemTools.cxx +++ b/Source/cmSystemTools.cxx @@ -1626,11 +1626,12 @@ std::string cmSystemTools::FindLibrary(const char* name, const std::vector<std::string>& userPaths) { // See if the executable exists as written. - if(cmSystemTools::FileExists(name)) + if(cmSystemTools::FileExists(name) && + !cmSystemTools::FileIsDirectory(name)) { return cmSystemTools::CollapseFullPath(name); } - + // Add the system search path to our path. std::vector<std::string> path = userPaths; cmSystemTools::GetPath(path); |