add termcolor (#1678)

* add termcolor

* fix indent

* fix termcolor hash
pull/1680/head
kooshie 2 years ago committed by GitHub
parent ed81f311b6
commit 49cd34c23f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 23
      packages/t/termcolor/xmake.lua

@ -0,0 +1,23 @@
package("termcolor")
set_kind("library", { headeronly = true })
set_homepage("https://github.com/ikalnytskyi/termcolor")
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.")
set_license("BSD-3-Clause")
add_urls("https://github.com/ikalnytskyi/termcolor/archive/refs/tags/v$(version).zip",
"https://github.com/ikalnytskyi/termcolor.git")
add_versions("2.1.0", "7b13b2adea95d9abfbbf7e7843da57136e81e806de35f4efe79a832a2bbaf56b")
on_install(function(package)
os.cp("include/termcolor/termcolor.hpp", package:installdir("include/termcolor"))
end)
on_test(function(package)
assert(package:check_cxxsnippets({ test = [[
void test() {
std::cout << termcolor::red
<< "Hello World!"
<< termcolor::reset;
}
]] }, { includes = "termcolor/termcolor.hpp" }))
end)
Loading…
Cancel
Save