Browse Source

tinycolormap: add package (#4358)

star9029 1 năm trước cách đây
mục cha
commit
70d06838a9
1 tập tin đã thay đổi với 23 bổ sung0 xóa
  1. 23 0
      packages/t/tinycolormap/xmake.lua

+ 23 - 0
packages/t/tinycolormap/xmake.lua

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