From c0a6728ef878caa3a53de0d2a7a2e0351afa07d4 Mon Sep 17 00:00:00 2001 From: Alexandre Bouvier Date: Thu, 27 Jun 2024 19:16:45 +0200 Subject: [PATCH] cmake: add package version file --- CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index af67205b..879a4c89 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,11 +14,15 @@ endif() if (PROJECT_IS_TOP_LEVEL) include(GNUInstallDirs) + include(CMakePackageConfigHelpers) install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(TARGETS VulkanMemoryAllocator EXPORT VulkanMemoryAllocatorConfig INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) install(EXPORT VulkanMemoryAllocatorConfig NAMESPACE "GPUOpen::" DESTINATION "share/cmake/VulkanMemoryAllocator") + write_basic_package_version_file(VulkanMemoryAllocatorConfigVersion.cmake COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT) + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/VulkanMemoryAllocatorConfigVersion.cmake" DESTINATION "share/cmake/VulkanMemoryAllocator") + option(VMA_BUILD_DOCUMENTATION "Create and install the HTML based API documentation") if(VMA_BUILD_DOCUMENTATION) find_package(Doxygen REQUIRED)