xmake.lua 985 B

1234567891011121314151617181920212223
  1. package("termcolor")
  2. set_kind("library", { headeronly = true })
  3. set_homepage("https://github.com/ikalnytskyi/termcolor")
  4. set_description("Termcolor is a header-only C++ library for printing colored messages to the terminal. Written just for fun with a help of the Force.")
  5. set_license("BSD-3-Clause")
  6. add_urls("https://github.com/ikalnytskyi/termcolor/archive/refs/tags/v$(version).zip",
  7. "https://github.com/ikalnytskyi/termcolor.git")
  8. add_versions("2.1.0", "7b13b2adea95d9abfbbf7e7843da57136e81e806de35f4efe79a832a2bbaf56b")
  9. on_install(function(package)
  10. os.cp("include/termcolor/termcolor.hpp", package:installdir("include/termcolor"))
  11. end)
  12. on_test(function(package)
  13. assert(package:check_cxxsnippets({ test = [[
  14. void test() {
  15. std::cout << termcolor::red
  16. << "Hello World!"
  17. << termcolor::reset;
  18. }
  19. ]] }, { includes = "termcolor/termcolor.hpp" }))
  20. end)