Merge patch from upstream to support <prefix>/lib/cmake search path in find_package() config mode. This enables reduction of /usr/lib cluttering find_package_support_prefix_lib_cmake.diff - stolen from 2.6 branch. Signed-off-by: Modestas Vainius <modestas@vainius.eu>ci/unstable
parent
c750b4cc0b
commit
58ae442c9e
@ -0,0 +1,31 @@
|
|||||||
|
--- a/Source/cmFindPackageCommand.cxx
|
||||||
|
+++ b/Source/cmFindPackageCommand.cxx
|
||||||
|
@@ -218,6 +218,7 @@
|
||||||
|
"UNIX (U), or Apple (A) conventions.\n"
|
||||||
|
" <prefix>/ (W)\n"
|
||||||
|
" <prefix>/(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"
|
||||||
|
"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);
|
Loading…
Reference in new issue