xmake.lua 896 B

123456789101112131415161718192021222324
  1. package("cr")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://fungos.github.io/cr-simple-c-hot-reload/")
  4. set_description("cr.h: A Simple C Hot Reload Header-only Library")
  5. set_license("MIT")
  6. add_urls("https://github.com/fungos/cr.git")
  7. add_versions("2022.11.06", "0e7fef63555cf73c70e4d9ae42f8a6e9cefb8e69")
  8. on_install("windows", "linux", "macosx", "mingw", "msys", "android", "iphoneos", "cross", function (package)
  9. os.cp("cr.h", package:installdir("include"))
  10. end)
  11. on_test(function (package)
  12. assert(package:check_cxxsnippets({test = [[
  13. #define CR_HOST
  14. #include <cr.h>
  15. void test() {
  16. cr_plugin ctx;
  17. cr_plugin_open(ctx, "c:/path/to/build/game.dll");
  18. cr_plugin_close(ctx);
  19. }
  20. ]]}, {configs = {languages = "c++11"}}))
  21. end)