[cmake-commits] king committed cmFindLibraryCommand.cxx 1.55 1.56

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Feb 6 15:26:24 EST 2008


Update of /cvsroot/CMake/CMake/Source
In directory public:/mounts/ram/cvs-serv30738/Source

Modified Files:
	cmFindLibraryCommand.cxx 
Log Message:
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.


Index: cmFindLibraryCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindLibraryCommand.cxx,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -d -r1.55 -r1.56
--- cmFindLibraryCommand.cxx	31 Jan 2008 12:50:40 -0000	1.55
+++ cmFindLibraryCommand.cxx	6 Feb 2008 20:26:22 -0000	1.56
@@ -263,6 +263,16 @@
       }
     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)



More information about the Cmake-commits mailing list