From cd07b1e9e30b71aa9f4d4efc302c6aa45220b017 Mon Sep 17 00:00:00 2001 From: muzili <2586850402@qq.com> Date: Tue, 29 Oct 2024 09:01:55 +0800 Subject: [PATCH] add lighthook lib repo. (#5600) * add meet lib repo * Update xmake.lua * Only windows is supported for the time being * remove mingw msys * add lighthook lib repo. --------- Co-authored-by: star9029 --- packages/l/lighthook/xmake.lua | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 packages/l/lighthook/xmake.lua diff --git a/packages/l/lighthook/xmake.lua b/packages/l/lighthook/xmake.lua new file mode 100644 index 00000000000..9de5d9435d4 --- /dev/null +++ b/packages/l/lighthook/xmake.lua @@ -0,0 +1,18 @@ +package("lighthook") + set_kind("library", {headeronly = true}) + set_homepage("https://github.com/SamuelTulach/LightHook") + set_description("Single-header, minimalistic, cross-platform hook library written in pure C ") + set_license("MIT") + + add_urls("https://github.com/SamuelTulach/LightHook/archive/refs/tags/$(version).tar.gz", + "https://github.com/SamuelTulach/LightHook.git") + + add_versions("2", "fae5bf8a3ea3d06377c10bcad9b4b8f3c1158598c8d64aa12409abdb701b095b") + + on_install("windows", function (package) + os.cp("Source/LightHook.h", package:installdir("include","lighthook")) + end) + + on_test(function (package) + assert(package:has_cfuncs("CreateHook", {includes = {"lighthook/LightHook.h"}})) + end)