Parcourir la source

cr: add package (#2401)

* cr: add package

* fix macosx

* disable plat
star9029 il y a 2 ans
Parent
commit
c244dcd1e0
1 fichiers modifiés avec 24 ajouts et 0 suppressions
  1. 24 0
      packages/c/cr/xmake.lua

+ 24 - 0
packages/c/cr/xmake.lua

@@ -0,0 +1,24 @@
+package("cr")
+    set_kind("library", {headeronly = true})
+    set_homepage("https://fungos.github.io/cr-simple-c-hot-reload/")
+    set_description("cr.h: A Simple C Hot Reload Header-only Library")
+    set_license("MIT")
+
+    add_urls("https://github.com/fungos/cr.git")
+    add_versions("2022.11.06", "0e7fef63555cf73c70e4d9ae42f8a6e9cefb8e69")
+
+    on_install("windows", "linux", "macosx", "mingw", "msys", "android", "iphoneos", "cross", function (package)
+        os.cp("cr.h", package:installdir("include"))
+    end)
+
+    on_test(function (package)
+        assert(package:check_cxxsnippets({test = [[
+            #define CR_HOST
+            #include <cr.h>
+            void test() {
+                cr_plugin ctx;
+                cr_plugin_open(ctx, "c:/path/to/build/game.dll");
+                cr_plugin_close(ctx);
+            }
+        ]]}, {configs = {languages = "c++11"}}))
+    end)