From 501053e5fba986b339c8a064cff35d576fa48208 Mon Sep 17 00:00:00 2001 From: Florian Reimold <11774314+FlorianReimold@users.noreply.github.com> Date: Mon, 13 May 2024 13:12:17 +0200 Subject: [PATCH] CMake: Udpcap now installs a udpcapConfigVersion.cmake file (#16) --- udpcap/CMakeLists.txt | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/udpcap/CMakeLists.txt b/udpcap/CMakeLists.txt index 0efa589..3fb2506 100644 --- a/udpcap/CMakeLists.txt +++ b/udpcap/CMakeLists.txt @@ -198,8 +198,16 @@ configure_package_config_file( INSTALL_DESTINATION ${UDPCAP_INSTALL_CMAKE_DIR} PATH_VARS UDPCAP_INSTALL_CMAKE_DIR ) +write_basic_package_version_file( + "${CMAKE_CURRENT_BINARY_DIR}/cmake_/udpcapConfigVersion.cmake" + VERSION ${PROJECT_VERSION} + COMPATIBILITY SameMajorVersion +) + install( - FILES "${CMAKE_CURRENT_BINARY_DIR}/cmake_/udpcapConfig.cmake" + FILES + "${CMAKE_CURRENT_BINARY_DIR}/cmake_/udpcapConfig.cmake" + "${CMAKE_CURRENT_BINARY_DIR}/cmake_/udpcapConfigVersion.cmake" DESTINATION ${UDPCAP_INSTALL_CMAKE_DIR} COMPONENT udpcap_dev )