Skip to content

Commit 257138b

Browse files
Reapply "Merge pull request #425 from abouvier/cmake-version"
This reverts commit dd5b5cb.
1 parent dd5b5cb commit 257138b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.15...3.26)
22

3-
project(VMA LANGUAGES CXX)
3+
project(VMA VERSION 3.1.0 LANGUAGES CXX)
44

55
add_library(VulkanMemoryAllocator INTERFACE)
66
add_library(GPUOpen::VulkanMemoryAllocator ALIAS VulkanMemoryAllocator)
@@ -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)