xmake.lua 763 B

123456789101112131415161718
  1. package("lighthook")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/SamuelTulach/LightHook")
  4. set_description("Single-header, minimalistic, cross-platform hook library written in pure C ")
  5. set_license("MIT")
  6. add_urls("https://github.com/SamuelTulach/LightHook/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/SamuelTulach/LightHook.git")
  8. add_versions("2", "fae5bf8a3ea3d06377c10bcad9b4b8f3c1158598c8d64aa12409abdb701b095b")
  9. on_install("windows", function (package)
  10. os.cp("Source/LightHook.h", package:installdir("include","lighthook"))
  11. end)
  12. on_test(function (package)
  13. assert(package:has_cfuncs("CreateHook", {includes = {"lighthook/LightHook.h"}}))
  14. end)