Skip to content

Commit

Permalink
microsoft-detours: support mingw (#3014)
Browse files Browse the repository at this point in the history
  • Loading branch information
star-hengxing authored Dec 31, 2023
1 parent d49fecf commit c292580
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions packages/m/microsoft-detours/xmake.lua
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
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")

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")
Expand All @@ -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)
Expand Down

0 comments on commit c292580

Please sign in to comment.