xmake.lua 870 B

12345678910111213141516171819
  1. package("stc")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/stclib/STC")
  4. set_description("A modern, user friendly, generic, type-safe and fast C99 container library: String, Vector, Sorted and Unordered Map and Set, Deque, Forward List, Smart Pointers, Bitset and Random numbers.")
  5. set_license("MIT")
  6. add_urls("https://github.com/stclib/STC/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/stclib/STC.git")
  8. add_versions("v4.2", "f16c3185ba5693f0257e5b521f0b6b3c11041433a4abbbbc531370364eb75d0c")
  9. on_install(function (package)
  10. os.cp("include", package:installdir())
  11. end)
  12. on_test(function (package)
  13. local defines = {"i_type=Floats", "i_val=float"}
  14. assert(package:has_cfuncs("Floats_push", {includes = "stc/cvec.h", configs = {defines = defines}}))
  15. end)