Merge pull request #425 from abouvier/cmake-version

cmake: add package version file
This commit is contained in:
Adam Sawicki 2024-06-28 11:09:27 +02:00 committed by GitHub
commit d708e0e124
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)