diff --git a/packages/c/cglm/xmake.lua b/packages/c/cglm/xmake.lua index e0b341d80..248e7aae9 100644 --- a/packages/c/cglm/xmake.lua +++ b/packages/c/cglm/xmake.lua @@ -5,12 +5,27 @@ package("cglm") add_urls("https://github.com/recp/cglm/archive/refs/tags/$(version).tar.gz", "https://github.com/recp/cglm.git") + add_versions("v0.9.4", "101376d9f5db7139a54db35ccc439e40b679bc2efb756d3469d39ee38e69c41b") + add_versions("v0.9.3", "4eda95e34f116c36203777f4fe770d64a3158b1450ea40364abb111cf4ba4773") add_versions("v0.9.2", "5c0639fe125c00ffaa73be5eeecd6be999839401e76cf4ee05ac2883447a5b4d") add_versions("v0.9.0", "9b688bc52915cdd4ad8b7d4080ef59cc92674d526856d8f16bb3a114db1dd794") add_deps("cmake") + if on_check then + on_check("windows", function (package) + import("core.tool.toolchain") + import("core.base.semver") + + local msvc = toolchain.load("msvc", {plat = package:plat(), arch = package:arch()}) + if msvc then + local vs_sdkver = msvc:config("vs_sdkver") + assert(vs_sdkver and semver.match(vs_sdkver):gt("10.0.19041"), "package(cglm): need vs_sdkver > 10.0.19041.0") + end + end) + end + on_install(function (package) local configs = {} table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))