find_package(<name>) does not find <prefix>/lib64/cmake/<name>/<name>Config.cmake
Using CMake version 3.23.1, while working on the TriBITS issue:
and the PR:
I found that when the name of the install lib dir is <prefix>/lib
, find find_package(<name>)
finds package-config files <prefix>/lib/cmake/<name>/<name>Config.cmake
just fine. However, the install lib dir to <prefix>/lib64
(which is actually the default name provided by the standard GNUInstallDirs
module on my machine), then the find_package()
command does not find those package-config files under there.
But the documentation for find_package()
as of CMake 3.23.1 says that find_package(<name>)
should search:
<prefix>/(lib/<arch>|lib*|share)/cmake/<name>*/
for which <prefix>/lib64/cmake/<name>/
should match.
I will see if this is fixed in the newest CMake release.
This appears to be the same issue reported in #12495 (closed)