diff --git a/CMakeLists.txt b/CMakeLists.txt index 2838b234c..cabdaa045 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -260,4 +260,14 @@ configure_package_config_file( INSTALL_DESTINATION lib/cmake/DDC ) -install(FILES ${CMAKE_CURRENT_BINARY_DIR}/DDCConfig.cmake DESTINATION lib/cmake/DDC) +write_basic_package_version_file( + ${CMAKE_CURRENT_BINARY_DIR}/DDCConfigVersion.cmake + COMPATIBILITY SameMinorVersion +) + +install( + FILES + ${CMAKE_CURRENT_BINARY_DIR}/DDCConfig.cmake + ${CMAKE_CURRENT_BINARY_DIR}/DDCConfigVersion.cmake + DESTINATION lib/cmake/DDC +) diff --git a/install_test/CMakeLists.txt b/install_test/CMakeLists.txt index ccd6436fd..871716f65 100644 --- a/install_test/CMakeLists.txt +++ b/install_test/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.22) project(test-installed-ddc LANGUAGES CXX) -find_package(DDC REQUIRED) +find_package(DDC 0.1 REQUIRED) message("DDC options:") message("DDC_BUILD_DOUBLE_PRECISION=${DDC_BUILD_DOUBLE_PRECISION}")