From d9b97201670de2867483858794ba80b52cea1d66 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 6 Feb 2008 15:26:22 -0500 Subject: [PATCH] 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. --- Source/cmFindLibraryCommand.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 6b8b105e3..b2211607f 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::iterator prefix = prefixes.begin(); prefix != prefixes.end(); ++prefix)