From 858ba3e3e0db4781dd88007a7f8c3c413e9525b5 Mon Sep 17 00:00:00 2001 From: Alfi Maulana Date: Thu, 28 Dec 2023 11:41:09 +0700 Subject: [PATCH] build(cmake): generate and install `ErrorsConfigVersion.cmake` --- CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 334acbf..cfceea8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -110,7 +110,15 @@ install( DESTINATION lib/cmake/Errors ) +include(CMakePackageConfigHelpers) +write_basic_package_version_file( + ErrorsConfigVersion.cmake + COMPATIBILITY SameMajorVersion +) + install( - FILES cmake/ErrorsConfig.cmake + FILES + cmake/ErrorsConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/ErrorsConfigVersion.cmake DESTINATION lib/cmake/Errors )