xmake.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package("teascript")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://tea-age.solutions/teascript/overview-and-highlights/")
  4. set_description("TeaScript C++ Library - embedded scripting language for C++ Applications")
  5. set_license("MPL-2.0")
  6. add_urls("https://github.com/Florian-Thake/TeaScript-Cpp-Library/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/Florian-Thake/TeaScript-Cpp-Library.git")
  8. add_versions("v0.13.0", "7c8cc05a8775ee2c857278b5e353670bf02442b2fa3a411343e82b2b85eedced")
  9. add_configs("fmt", {description = "Use fmt for printing.", default = true, type = "boolean"})
  10. add_configs("toml++", {description = "Enable toml support.", default = true, type = "boolean"})
  11. on_load(function (package)
  12. if package:config("fmt") then
  13. package:add("deps", "fmt")
  14. end
  15. if package:config("toml++") then
  16. package:add("deps", "toml++")
  17. end
  18. end)
  19. on_install("windows", "linux", "macosx|arm64", "bsd", "msys", "mingw|i386", function (package)
  20. os.cp("include", package:installdir())
  21. end)
  22. on_test(function (package)
  23. assert(package:check_cxxsnippets({test = [[
  24. #include "teascript/Engine.hpp"
  25. void test() {
  26. teascript::Engine engine;
  27. engine.ExecuteCode("println(\"Hello, World!\");");
  28. }
  29. ]]}, {configs = {languages = "c++20"}}))
  30. end)