diff options
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 15 | ||||
-rw-r--r-- | Tests/FindPackageTest/CMakeLists.txt | 4 | ||||
-rw-r--r-- | Tests/FindPackageTest/lib/cmake/zot-3.1/zot-config-version.cmake (renamed from Tests/FindPackageTest/lib/zot-3.1/zot-config-version.cmake) | 0 | ||||
-rw-r--r-- | Tests/FindPackageTest/lib/cmake/zot-3.1/zot-config.cmake (renamed from Tests/FindPackageTest/lib/zot-3.1/zot-config.cmake) | 0 |
4 files changed, 17 insertions, 2 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 7c326ff..78b73fd 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -222,6 +222,7 @@ cmFindPackageCommand::cmFindPackageCommand() "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 " @@ -1789,6 +1790,20 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) 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); diff --git a/Tests/FindPackageTest/CMakeLists.txt b/Tests/FindPackageTest/CMakeLists.txt index 62a4dc7..b6691e7 100644 --- a/Tests/FindPackageTest/CMakeLists.txt +++ b/Tests/FindPackageTest/CMakeLists.txt @@ -85,12 +85,12 @@ SET(TApp_EXPECTED SET(Tapp_EXPECTED "TApp.app/Contents/Resources/cmake/tapp-config.cmake") SET(VersionedA_EXPECTED "lib/zot-2.0/zot-config.cmake") -SET(VersionedB_EXPECTED "lib/zot-3.1/zot-config.cmake") +SET(VersionedB_EXPECTED "lib/cmake/zot-3.1/zot-config.cmake") SET(wibbleA_EXPECTED "A/wibble-config.cmake") SET(wibbleB_EXPECTED "B/wibble-config.cmake") SET(RecursiveA_EXPECTED "lib/RecursiveA/recursivea-config.cmake") SET(RecursiveB_EXPECTED "lib/zot-2.0/zot-config.cmake") -SET(RecursiveC_EXPECTED "lib/zot-3.1/zot-config.cmake") +SET(RecursiveC_EXPECTED "lib/cmake/zot-3.1/zot-config.cmake") # Check the results. FOREACH(p ${PACKAGES}) diff --git a/Tests/FindPackageTest/lib/zot-3.1/zot-config-version.cmake b/Tests/FindPackageTest/lib/cmake/zot-3.1/zot-config-version.cmake index b54d94c..b54d94c 100644 --- a/Tests/FindPackageTest/lib/zot-3.1/zot-config-version.cmake +++ b/Tests/FindPackageTest/lib/cmake/zot-3.1/zot-config-version.cmake diff --git a/Tests/FindPackageTest/lib/zot-3.1/zot-config.cmake b/Tests/FindPackageTest/lib/cmake/zot-3.1/zot-config.cmake index deffa57..deffa57 100644 --- a/Tests/FindPackageTest/lib/zot-3.1/zot-config.cmake +++ b/Tests/FindPackageTest/lib/cmake/zot-3.1/zot-config.cmake |