diff options
author | Alex Turbov <i.zaufi@gmail.com> | 2022-06-27 03:10:27 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2022-08-04 13:41:59 (GMT) |
commit | e55c154c5b1cbecd826ac216d69ce88845a56cdc (patch) | |
tree | e04494b7a5bec3fccfd085425ba1cf674540514f /Source/cmFindPackageCommand.cxx | |
parent | 57fb264085f7ed9349350cafb45b91bc924a7022 (diff) | |
download | CMake-e55c154c5b1cbecd826ac216d69ce88845a56cdc.zip CMake-e55c154c5b1cbecd826ac216d69ce88845a56cdc.tar.gz CMake-e55c154c5b1cbecd826ac216d69ce88845a56cdc.tar.bz2 |
cmFindPackageCommand: Add one more search path
The `PREFIX/(Foo|foo|FOO).*/(cmake|CMake)/(Foo|foo|FOO).*/` search
path is the similar to the one already exists
`PREFIX/(Foo|foo|FOO).*/(lib/ARCH|lib*|share)/cmake/(Foo|foo|FOO).*/`.
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index f260ec7..92e98c5 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -2524,6 +2524,16 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) return true; } + auto secondPkgDirGen = + cmProjectDirectoryListGenerator{ this->Names, this->SortOrder, + this->SortDirection }; + + // PREFIX/(Foo|foo|FOO).*/(cmake|CMake)/(Foo|foo|FOO).*/ + if (TryGeneratedPaths(searchFn, prefix, firstPkgDirGen, iCMakeGen, + secondPkgDirGen)) { + return true; + } + // Construct list of common install locations (lib and share). std::vector<cm::string_view> common; std::string libArch; @@ -2561,10 +2571,6 @@ bool cmFindPackageCommand::SearchPrefix(std::string const& prefix_in) return true; } - auto secondPkgDirGen = - cmProjectDirectoryListGenerator{ this->Names, this->SortOrder, - this->SortDirection }; - // PREFIX/(Foo|foo|FOO).*/(lib/ARCH|lib*|share)/cmake/(Foo|foo|FOO).*/ if (TryGeneratedPaths(searchFn, prefix, firstPkgDirGen, cmnGen, cmakeGen, secondPkgDirGen)) { |