diff options
author | Brad King <brad.king@kitware.com> | 2016-08-24 13:45:47 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-08-24 13:45:47 (GMT) |
commit | ccddb454b8e7ae3ae075db5fd3233ce86c8c70cb (patch) | |
tree | bd725b0ee02b42c32461d2c248c5823125d0b260 /Source | |
parent | 4a2a66e31c4b7fbcc6bbe41219a6c7f0624dc165 (diff) | |
parent | 828d6c137d703ea095008fc6da794904a15c4ebd (diff) | |
download | CMake-ccddb454b8e7ae3ae075db5fd3233ce86c8c70cb.zip CMake-ccddb454b8e7ae3ae075db5fd3233ce86c8c70cb.tar.gz CMake-ccddb454b8e7ae3ae075db5fd3233ce86c8c70cb.tar.bz2 |
Merge topic 'extend-find-package-search-path'
828d6c13 find_package: Extend search path for combined Windows/UNIX convention
ff5c89de Help: Widen find_package search path table
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 260079b..8338c2a 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -1961,6 +1961,44 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) } } + // PREFIX/(Foo|foo|FOO).*/(lib/ARCH|lib|share)/cmake/(Foo|foo|FOO).*/ + { + cmFindPackageFileList lister(this); + lister / cmFileListGeneratorFixed(prefix) / + cmFileListGeneratorProject(this->Names) / + cmFileListGeneratorEnumerate(common) / + cmFileListGeneratorFixed("cmake") / + cmFileListGeneratorProject(this->Names); + if (lister.Search()) { + return true; + } + } + + // PREFIX/(Foo|foo|FOO).*/(lib/ARCH|lib|share)/(Foo|foo|FOO).*/ + { + cmFindPackageFileList lister(this); + lister / cmFileListGeneratorFixed(prefix) / + cmFileListGeneratorProject(this->Names) / + cmFileListGeneratorEnumerate(common) / + cmFileListGeneratorProject(this->Names); + if (lister.Search()) { + return true; + } + } + + // PREFIX/(Foo|foo|FOO).*/(lib/ARCH|lib|share)/(Foo|foo|FOO).*/(cmake|CMake)/ + { + cmFindPackageFileList lister(this); + lister / cmFileListGeneratorFixed(prefix) / + cmFileListGeneratorProject(this->Names) / + cmFileListGeneratorEnumerate(common) / + cmFileListGeneratorProject(this->Names) / + cmFileListGeneratorCaseInsensitive("cmake"); + if (lister.Search()) { + return true; + } + } + return false; } |