xmake.lua 1.1 KB

123456789101112131415161718192021222324252627
  1. package("luabridge3")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://kunitoki.github.io/LuaBridge3")
  4. set_description("LuaBridge3 is a lightweight and dependency-free library for mapping data, functions, and classes back and forth between C++ and Lua.")
  5. set_license("MIT")
  6. add_urls("https://github.com/kunitoki/LuaBridge3/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/kunitoki/LuaBridge3.git")
  8. add_versions("3.0-rc3", "842a3803587c42568f6f4e65314f762fb7724c9c7c91efc930282921dbf9a79f")
  9. on_install(function (package)
  10. os.cp("Source", path.join(package:installdir("include"), "luabridge3"))
  11. end)
  12. on_test(function (package)
  13. assert(package:check_cxxsnippets({test = [[
  14. #define LUA_VERSION_NUM
  15. #include <luabridge3/LuaBridge/detail/Errors.h>
  16. void test()
  17. {
  18. luabridge::ErrorCode errorCode;
  19. const luabridge::detail::ErrorCategory& category = luabridge::detail::ErrorCategory::getInstance();
  20. category.name();
  21. }
  22. ]]}, {configs = {languages = "c++17"}}))
  23. end)