xmake.lua 1.4 KB

123456789101112131415161718192021222324252627282930
  1. package("vulkan-memory-allocator-hpp")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://gpuopen-librariesandsdks.github.io/VulkanMemoryAllocator/html/")
  4. set_description("C++ bindings for VulkanMemoryAllocator.")
  5. set_license("CC0")
  6. add_urls("https://github.com/YaaZ/VulkanMemoryAllocator-Hpp/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/YaaZ/VulkanMemoryAllocator-Hpp.git")
  8. add_versions("v3.0.0", '2f062b1631af64519d09e7b319c2ba06d7de3c9c5589fb7109a3f4e341cee2b7')
  9. add_versions("v3.0.1-1", '0e0c374751d5ca6123d0ae0df756693f0674412d7c758ec4a39a5a9dcc412911')
  10. add_versions("v3.0.1-3", '66a3d4be3bc1404c844b5a36aadeb6b366878e7cf1efe899eb0a0095f3871aae')
  11. add_deps("vulkan-memory-allocator")
  12. on_install("windows|x86", "windows|x64", "linux", "macosx", "mingw", "android", "iphoneos", function (package)
  13. os.cp("include", package:installdir())
  14. if package:gitref() or package:version():ge("3.0.1") then
  15. package:add("deps", "vulkan-hpp >= 1.3.234")
  16. else
  17. package:add("deps", "vulkan-hpp < 1.3.234")
  18. end
  19. end)
  20. on_test(function (package)
  21. assert(package:check_cxxsnippets({test = [[
  22. void test() {
  23. int version = VMA_VULKAN_VERSION;
  24. }
  25. ]]}, {includes = "vk_mem_alloc.hpp", configs = {languages = "c++11"} }))
  26. end)