浏览代码

picosha2: add package (#2575)

star9029 2 年之前
父节点
当前提交
b43de0fcf3
共有 1 个文件被更改,包括 21 次插入0 次删除
  1. 21 0
      packages/p/picosha2/xmake.lua

+ 21 - 0
packages/p/picosha2/xmake.lua

@@ -0,0 +1,21 @@
+package("picosha2")
+    set_kind("library", {headeronly = true})
+    set_homepage("https://github.com/okdshin/PicoSHA2")
+    set_description("a header-file-only, SHA256 hash generator in C++")
+    set_license("MIT")
+
+    add_urls("https://github.com/okdshin/PicoSHA2.git")
+    add_versions("2022.08.08", "27fcf6979298949e8a462e16d09a0351c18fcaf2")
+
+    on_install(function (package)
+        os.cp("picosha2.h", package:installdir("include"))
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            #include <picosha2.h>
+            void test() {
+                picosha2::hash256_one_by_one hasher;
+            }
+        ]]}))
+    end)