I wrote:
Indeed, CMake will also find CMake data under %{_datadir}, and data
for
noarch packages must be installed there.
CMake will not do it automagically for you, you need to actually
explicitly install the files to the proper place. INSTALL(EXPORTS takes a
DESTINATION argument:
https://cmake.org/cmake/help/v3.15/command/install.html#installing-exports
It needs to be set to the correct path.
PS: I guess all upstreams just copy&paste the example in:
https://cmake.org/cmake/help/v3.15/manual/cmake-packages.7.html#creating-...
which hardcodes:
set(ConfigPackageLocation lib/cmake/ClimbingStats)
and do not understand that architecture-independent packages should use:
set(ConfigPackageLocation share/cmake/ClimbingStats)
instead (and hardcoding "lib" is entirely wrong because this should usually
be "lib64" on Fedora).
Kevin Kofler