From 7acdcf0d9607a9061c9e5fc01c69d39407a96a61 Mon Sep 17 00:00:00 2001 From: star9029 Date: Wed, 6 Nov 2024 19:01:52 +0800 Subject: [PATCH] microsoft-gsl: add v4.1.0 version --- packages/m/microsoft-gsl/xmake.lua | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/m/microsoft-gsl/xmake.lua b/packages/m/microsoft-gsl/xmake.lua index 7ec3cdd3906..7d705c02087 100644 --- a/packages/m/microsoft-gsl/xmake.lua +++ b/packages/m/microsoft-gsl/xmake.lua @@ -4,13 +4,19 @@ package("microsoft-gsl") set_description("Guidelines Support Library") set_license("MIT") - add_urls("https://github.com/microsoft/GSL/archive/$(version).tar.gz", + add_urls("https://github.com/microsoft/GSL/archive/refs/tags/$(version).tar.gz", "https://github.com/microsoft/GSL.git") - add_versions("v3.1.0", "d3234d7f94cea4389e3ca70619b82e8fb4c2f33bb3a070799f1e18eef500a083") + + add_versions("v4.1.0", "0a227fc9c8e0bf25115f401b9a46c2a68cd28f299d24ab195284eb3f1d7794bd") add_versions("v4.0.0", "f0e32cb10654fea91ad56bde89170d78cfbf4363ee0b01d8f097de2ba49f6ce9") + add_versions("v3.1.0", "d3234d7f94cea4389e3ca70619b82e8fb4c2f33bb3a070799f1e18eef500a083") + + add_deps("cmake") on_install(function (package) - os.mv("include/gsl", package:installdir("include")) + local configs = {"-DGSL_TEST=OFF", "-DGSL_INSTALL=ON"} + table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release")) + import("package.tools.cmake").install(package, configs) end) on_test(function (package)