summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-08-24 13:45:47 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-08-24 13:45:47 (GMT)
commitccddb454b8e7ae3ae075db5fd3233ce86c8c70cb (patch)
treebd725b0ee02b42c32461d2c248c5823125d0b260 /Source
parent4a2a66e31c4b7fbcc6bbe41219a6c7f0624dc165 (diff)
parent828d6c137d703ea095008fc6da794904a15c4ebd (diff)
downloadCMake-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.cxx38
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;
}