cr: add package (#2401)

* cr: add package

* fix macosx

* disable plat
pull/2406/head
star9029 2 years ago committed by GitHub
parent 1891386ebe
commit c244dcd1e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 24
      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)
Loading…
Cancel
Save