Since this is a header-only library, the CMake Version file should be marked architecture-independent with the ARCH_INDEPENDENT option. As the option has been added in CMake 3.14 and spriv-headers supports CMake 3.0 the option has to be passed only if supported.
set(namespace "${PROJECT_NAME}::")
include(CMakePackageConfigHelpers)
+
+ if (NOT CMAKE_VERSION VERSION_LESS 3.14)
+ set(arch_independent_str ARCH_INDEPENDENT)
+ endif()
write_basic_package_version_file(
"${version_config}"
COMPATIBILITY SameMajorVersion
+ ${arch_independent_str}
)
configure_package_config_file(