diff options
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 9e998aa..9577b42 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -222,6 +222,8 @@ cmFindPackageCommand::cmFindPackageCommand() "UNIX (U), or Apple (A) conventions.\n" " <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" " <prefix>/(share|lib)/<name>*/(cmake|CMake)/ (U)\n" @@ -1783,6 +1785,31 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) } } + // 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; if(this->UseLib64Paths) |