--- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -218,6 +218,7 @@ "UNIX (U), or Apple (A) conventions.\n" " / (W)\n" " /(cmake|CMake)/ (W)\n" + " /(share|lib)/cmake/*/ (U)\n" " /(share|lib)/*/ (U)\n" " /(share|lib)/*/(cmake|CMake)/ (U)\n" "On systems supporting OS X Frameworks and Application Bundles " @@ -1710,6 +1711,20 @@ common.push_back("lib"); 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).*/ { cmFindPackageFileList lister(this);