[Cmake-commits] [cmake-commits] king committed cmFindPackageCommand.cxx 1.53 1.54

cmake-commits at cmake.org cmake-commits at cmake.org
Wed Dec 17 09:24:07 EST 2008


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

Modified Files:
	cmFindPackageCommand.cxx 
Log Message:
ENH: Teach find_package about more install dirs

We now search in

  <prefix>/<name>*/
  <prefix>/<name>*/(cmake|CMake)

when looking for package configuration files.  This is useful on Windows
since the Program Files folder is in CMAKE_SYSTEM_PREFIX_PATH.  These
paths are the Windows equivalent to the Apple convention application and
framework paths we already search.  See issue #8264.


Index: cmFindPackageCommand.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/cmFindPackageCommand.cxx,v
retrieving revision 1.53
retrieving revision 1.54
diff -C 2 -d -r1.53 -r1.54
*** cmFindPackageCommand.cxx	16 Dec 2008 14:23:41 -0000	1.53
--- cmFindPackageCommand.cxx	17 Dec 2008 14:24:05 -0000	1.54
***************
*** 223,226 ****
--- 223,228 ----
      "  <prefix>/                                               (W)\n"
      "  <prefix>/(cmake|CMake)/                                 (W)\n"
+     "  <prefix>/<name>*/                                       (W)\n"
+     "  <prefix>/<name>*/(cmake|CMake)/                         (W)\n"
      "  <prefix>/(share|lib)/cmake/<name>*/                     (U)\n"
      "  <prefix>/(share|lib)/<name>*/                           (U)\n"
***************
*** 1784,1787 ****
--- 1786,1814 ----
    }
  
+   //  PREFIX/(Foo|foo|FOO).*/
+   {
+   cmFindPackageFileList lister(this);
+   lister
+     / cmFileListGeneratorFixed(prefix)
+     / cmFileListGeneratorProject(this->Names);
+   if(lister.Search())
+     {
+     return true;
+     }
+   }
+ 
+   //  PREFIX/(Foo|foo|FOO).*/(cmake|CMake)/
+   {
+   cmFindPackageFileList lister(this);
+   lister
+     / cmFileListGeneratorFixed(prefix)
+     / cmFileListGeneratorProject(this->Names)
+     / cmFileListGeneratorCaseInsensitive("cmake");
+   if(lister.Search())
+     {
+     return true;
+     }
+   }
+ 
    // Construct list of common install locations (lib and share).
    std::vector<std::string> common;



More information about the Cmake-commits mailing list