xmake.lua 931 B

123456789101112131415161718192021222324
  1. package("xhook")
  2. set_homepage("https://github.com/iqiyi/xHook")
  3. set_description("PLT (Procedure Linkage Table) hook library for Android native ELF (executable and shared libraries)")
  4. add_urls("https://github.com/iqiyi/xHook/archive/$(version).tar.gz")
  5. add_versions("v1.2.0", "b4153559ea4d0f975ad46783374a0103e165a81c767e9515a3b2d6efe70a06ae")
  6. add_syslinks("log")
  7. on_install("android", function (package)
  8. os.cd("libxhook/jni")
  9. io.writefile("xmake.lua", [[
  10. add_rules("mode.release", "mode.debug")
  11. target("xhook")
  12. set_kind("static")
  13. set_warnings("allextra", "error")
  14. add_files("*.c")
  15. add_headerfiles("xhook.h")
  16. ]])
  17. import("package.tools.xmake").install(package)
  18. end)
  19. on_test(function (package)
  20. assert(package:has_cfuncs("xhook_register", {includes = "xhook.h"}))
  21. end)