From 9d08595b17e698a2097021c98e50e9811bd4766f Mon Sep 17 00:00:00 2001 From: Maxime Griot Date: Fri, 6 Nov 2020 14:20:28 +0100 Subject: [PATCH] Add mhook for windows --- packages/m/mhook/xmake.lua | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 packages/m/mhook/xmake.lua diff --git a/packages/m/mhook/xmake.lua b/packages/m/mhook/xmake.lua new file mode 100644 index 000000000..d2b46dc83 --- /dev/null +++ b/packages/m/mhook/xmake.lua @@ -0,0 +1,20 @@ +package("mhook") + + set_homepage("https://github.com/martona/mhook") + set_description("A Windows API hooking library ") + + set_urls("https://github.com/apriorit/mhook/archive/$(version).zip") + + add_versions("2.5.1", "37e7d65422a770b0a28835b4fe557823278f7118ff4a399d7acf345c8db318e5") + + add_patches("2.5.1", "https://github.com/apriorit/mhook/commit/5ccb00a9c89280bfff7ce595873a9923415172a7.patch", + "56561718ccf05c8c42fff05e6531cfa525cf93e0c9fa3bd226e74ef19eae1a1f") + + on_install("windows", function (package) + local configs = {} + import("package.tools.cmake").install(package, configs, {buildir = "build"}) + end) + + on_test(function (package) + assert(package:has_cxxfuncs("Mhook_SetHookEx", {includes = {"windows.h", "mhook-lib/mhook.h"}})) + end) \ No newline at end of file