From c292580ee14c860a8b1d87bec5cdf2c4bb5b2e18 Mon Sep 17 00:00:00 2001 From: star9029 Date: Sun, 31 Dec 2023 15:57:26 +0800 Subject: [PATCH] microsoft-detours: support mingw (#3014) --- packages/m/microsoft-detours/xmake.lua | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/packages/m/microsoft-detours/xmake.lua b/packages/m/microsoft-detours/xmake.lua index 80a36e88b..ccbd263b7 100644 --- a/packages/m/microsoft-detours/xmake.lua +++ b/packages/m/microsoft-detours/xmake.lua @@ -1,5 +1,4 @@ package("microsoft-detours") - set_homepage("https://github.com/microsoft/Detours") set_description("Detours is a software package for monitoring and instrumenting API calls on Windows. It is distributed in source code form.") set_license("MIT") @@ -7,8 +6,7 @@ package("microsoft-detours") set_urls("https://github.com/microsoft/Detours.git") add_versions("2023.6.8", "734ac64899c44933151c1335f6ef54a590219221") - on_install("windows", function (package) - local configs = {} + on_install("windows", "mingw", function (package) io.writefile("xmake.lua", [[ add_rules("mode.debug", "mode.release") target("microsoft-detours") @@ -20,13 +18,10 @@ package("microsoft-detours") add_defines("DETOUR_DEBUG=1") end ]]) - if package:config("shared") then - configs.kind = "shared" - end if package:is_debug() then package:add("defines", "DETOUR_DEBUG=1") end - import("package.tools.xmake").install(package, configs) + import("package.tools.xmake").install(package) end) on_test(function (package)