Skip to content

Commit c0a6728

Browse files
committed
cmake: add package version file
1 parent feb11e1 commit c0a6728

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,15 @@ endif()
1414

1515
if (PROJECT_IS_TOP_LEVEL)
1616
include(GNUInstallDirs)
17+
include(CMakePackageConfigHelpers)
1718

1819
install(DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/include/" DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
1920
install(TARGETS VulkanMemoryAllocator EXPORT VulkanMemoryAllocatorConfig INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
2021
install(EXPORT VulkanMemoryAllocatorConfig NAMESPACE "GPUOpen::" DESTINATION "share/cmake/VulkanMemoryAllocator")
2122

23+
write_basic_package_version_file(VulkanMemoryAllocatorConfigVersion.cmake COMPATIBILITY SameMajorVersion ARCH_INDEPENDENT)
24+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/VulkanMemoryAllocatorConfigVersion.cmake" DESTINATION "share/cmake/VulkanMemoryAllocator")
25+
2226
option(VMA_BUILD_DOCUMENTATION "Create and install the HTML based API documentation")
2327
if(VMA_BUILD_DOCUMENTATION)
2428
find_package(Doxygen REQUIRED)

0 commit comments

Comments
 (0)