From 5cd9a23f987998ea5f8df504e579b9c431b36166 Mon Sep 17 00:00:00 2001 From: star9029 Date: Sun, 12 May 2024 10:33:14 +0800 Subject: [PATCH] cglm: add v0.9.3 (#4011) * cglm: add v0.9.3 * Update xmake.lua * add print * Update xmake.lua --- packages/c/cglm/xmake.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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"))