According to https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html, the cmake version config file should be installed alongside the cmake config file; however:
install(EXPORT cppitertools-targets
FILE cppitertools-config.cmake
NAMESPACE cppitertools::
DESTINATION ${cppitertools_INSTALL_CMAKE_DIR}/cppitertools
)
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/cppitertools-config-version.cmake DESTINATION ${cppitertools_INSTALL_CMAKE_DIR})
is how the version file is installed -- afaict, this is a silent failure to use the version file. It seems that the DESTINATION should probably be ${cppitertools_INSTALL_CMAKE_DIR}/cppitertools, like the cppitertools-config.cmake file.
According to https://cmake.org/cmake/help/latest/manual/cmake-packages.7.html, the cmake version config file should be installed alongside the cmake config file; however:
is how the version file is installed -- afaict, this is a silent failure to use the version file. It seems that the
DESTINATIONshould probably be${cppitertools_INSTALL_CMAKE_DIR}/cppitertools, like thecppitertools-config.cmakefile.