xmake.lua 674 B

123456789101112131415161718
  1. package("ruapu")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/nihui/ruapu")
  4. set_description("Detect CPU features with single-file")
  5. set_license("MIT")
  6. add_urls("https://github.com/nihui/ruapu/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/nihui/ruapu.git")
  8. add_versions("0.1.0", "65fd826ed1772717d4cee70b6620277df0328408612f7643658a0064f1a163ff")
  9. on_install(function (package)
  10. os.cp("ruapu.h", package:installdir("include"))
  11. end)
  12. on_test(function (package)
  13. assert(package:has_cfuncs("ruapu_init", {includes = "ruapu.h", defines = "RUAPU_IMPLEMENTATION"}))
  14. end)