From 94e87bed3eb2bac65513a8b1e6b950ea6f754631 Mon Sep 17 00:00:00 2001 From: star9029 Date: Sun, 17 Dec 2023 14:00:46 +0800 Subject: [PATCH] vulkan-utility-libraries: add package (#2951) * vulkan-utility-libraries: add package * disable plat --- packages/v/vulkan-headers/xmake.lua | 2 +- packages/v/vulkan-utility-libraries/xmake.lua | 27 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 packages/v/vulkan-utility-libraries/xmake.lua diff --git a/packages/v/vulkan-headers/xmake.lua b/packages/v/vulkan-headers/xmake.lua index 47b491c18..74c8e0b2e 100644 --- a/packages/v/vulkan-headers/xmake.lua +++ b/packages/v/vulkan-headers/xmake.lua @@ -13,7 +13,7 @@ package("vulkan-headers") return version:startswith("v") and version or prefix .. version:gsub("%+", ".") end}) - -- when adding a new sdk version, please also update vulkan-loader, spirv-headers, spirv-reflect, glslang and volk packages + -- when adding a new sdk version, please also update vulkan-loader, vulkan-utility-libraries, spirv-headers, spirv-reflect, glslang and volk packages add_versions("1.3.268+0", "94993cbe2b1a604c0d5d9ea37a767e1aba4d771d2bfd4ddceefd66243095164f") add_versions("1.3.261+1", "7a25ebdb6325e626dc5d33bc937b289ccce7ddb7b0ac1a1b1d5d7ff33b6715d3") add_versions("1.3.250+1", "e5b563a415e73725bcf471b7e3e837804ed3703b47cce4553db5e7e73821c5ee") diff --git a/packages/v/vulkan-utility-libraries/xmake.lua b/packages/v/vulkan-utility-libraries/xmake.lua new file mode 100644 index 000000000..62704fb17 --- /dev/null +++ b/packages/v/vulkan-utility-libraries/xmake.lua @@ -0,0 +1,27 @@ +package("vulkan-utility-libraries") + set_homepage("https://github.com/KhronosGroup/Vulkan-Utility-Libraries") + set_description("Utility libraries for Vulkan developers") + set_license("Apache-2.0") + + add_urls("https://github.com/KhronosGroup/Vulkan-Utility-Libraries/archive/refs/tags/v1.3.268.tar.gz", + "https://github.com/KhronosGroup/Vulkan-Utility-Libraries.git") + + add_versions("v1.3.268", "990de84b66094b647ae420ba13356b79d69e1c6f95532f40466457d51a9d127d") + + if is_plat("windows") then + add_syslinks("advapi32") + end + + add_deps("cmake") + add_deps("vulkan-headers") + + on_install("windows", "linux", "macosx", "bsd", "mingw", "msys", "cross", function (package) + local configs = {"-DBUILD_TESTS=OFF", "-DUPDATE_DEPS=OFF"} + table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) + table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF")) + import("package.tools.cmake").install(package, configs) + end) + + on_test(function (package) + assert(package:has_cfuncs("vkuCreateLayerSettingSet", {includes = "vulkan/layer/vk_layer_settings.h"})) + end)