diff options
author | Brad King <brad.king@kitware.com> | 2008-02-06 20:26:22 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-02-06 20:26:22 (GMT) |
commit | d9b97201670de2867483858794ba80b52cea1d66 (patch) | |
tree | ea63af41d7e722d346ba83b68188566504a76d24 /Source/cmFindLibraryCommand.cxx | |
parent | a5074872b070ff1675a64bda78f5e6d2d29315c3 (diff) | |
download | CMake-d9b97201670de2867483858794ba80b52cea1d66.zip CMake-d9b97201670de2867483858794ba80b52cea1d66.tar.gz CMake-d9b97201670de2867483858794ba80b52cea1d66.tar.bz2 |
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.
Diffstat (limited to 'Source/cmFindLibraryCommand.cxx')
-rw-r--r-- | Source/cmFindLibraryCommand.cxx | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 6b8b105..b221160 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -263,6 +263,16 @@ std::string cmFindLibraryCommand::FindLibrary(const char* name) } 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. for(std::vector<std::string>::iterator prefix = prefixes.begin(); prefix != prefixes.end(); ++prefix) |