xmake.lua 691 B

123456789101112131415161718
  1. package("libpopcnt")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/kimwalisch/libpopcnt")
  4. set_description("🚀 Fast C/C++ bit population count library")
  5. set_license("BSD-2-Clause")
  6. add_urls("https://github.com/kimwalisch/libpopcnt/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/kimwalisch/libpopcnt.git")
  8. add_versions("v3.1", "b4ea061f4c2e5385dff0dd032ad5a16c60dc0dd050391283afb463c0d62c19bd")
  9. on_install(function (package)
  10. os.cp("libpopcnt.h", package:installdir("include"))
  11. end)
  12. on_test(function (package)
  13. assert(package:has_cfuncs("popcnt", {includes = "libpopcnt.h"}))
  14. end)