[Cmake-commits] [cmake-commits] king committed cmFindPackageCommand.cxx 1.51 1.52

cmake-commits at cmake.org cmake-commits at cmake.org
Tue Dec 9 14:07:22 EST 2008


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

Modified Files:
	cmFindPackageCommand.cxx 
Log Message:
ENH: Add useful search locations to find_package

This teaches find_package to search

  <prefix>/(share|lib)/cmake/<name>*/

for package configuration files.  Packages that do not already have
files in a <prefix>/lib/<name>* directory can use this location to avoid
cluttering the lib directory.


Index: cmFindPackageCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPackageCommand.cxx,v
retrieving revision 1.51
retrieving revision 1.52
diff -C 2 -d -r1.51 -r1.52
*** cmFindPackageCommand.cxx	9 Dec 2008 19:07:10 -0000	1.51
--- cmFindPackageCommand.cxx	9 Dec 2008 19:07:19 -0000	1.52
***************
*** 223,226 ****
--- 223,227 ----
      "  <prefix>/                                               (W)\n"
      "  <prefix>/(cmake|CMake)/                                 (W)\n"
+     "  <prefix>/(share|lib)/cmake/<name>*/                     (U)\n"
      "  <prefix>/(share|lib)/<name>*/                           (U)\n"
      "  <prefix>/(share|lib)/<name>*/(cmake|CMake)/             (U)\n"
***************
*** 1790,1793 ****
--- 1791,1808 ----
    common.push_back("share");
  
+   //  PREFIX/(share|lib)/cmake/(Foo|foo|FOO).*/
+   {
+   cmFindPackageFileList lister(this);
+   lister
+     / cmFileListGeneratorFixed(prefix)
+     / cmFileListGeneratorEnumerate(common)
+     / cmFileListGeneratorFixed("cmake")
+     / cmFileListGeneratorProject(this->Names);
+   if(lister.Search())
+     {
+     return true;
+     }
+   }
+ 
    //  PREFIX/(share|lib)/(Foo|foo|FOO).*/
    {



More information about the Cmake-commits mailing list