xmake.lua 940 B

1234567891011121314151617181920212223
  1. package("tinycolormap")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/yuki-koyama/tinycolormap")
  4. set_description("A header-only, single-file library for colormaps written in C++11")
  5. set_license("MIT")
  6. add_urls("https://github.com/yuki-koyama/tinycolormap/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/yuki-koyama/tinycolormap.git")
  8. add_versions("v0.7.0", "5e03b6c35c658aa7273ca6fb38ef9df06f885a2429191059c8770d5ff8b65951")
  9. on_install(function (package)
  10. os.cp("include", package:installdir())
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. void test() {
  15. double value = 0.75;
  16. auto color = tinycolormap::GetColor(value, tinycolormap::ColormapType::Viridis);
  17. }
  18. ]]}, {configs = {languages = "c++11"}, includes = "tinycolormap.hpp"}))
  19. end)