xmake.lua 1.1 KB

1234567891011121314151617181920212223242526272829
  1. package("limonp")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/yanyiwu/limonp")
  4. set_description("C++ headers(hpp) library with Python style.")
  5. set_license("MIT")
  6. add_urls("https://github.com/yanyiwu/limonp/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/yanyiwu/limonp.git")
  8. add_versions("v1.0.0", "57c088a10ceda774e05281b1fc7779455af2cc824969e331874871822452e24f")
  9. add_versions("v0.9.0", "92d90b262ab2e3375dd386731deeb028f88ee7d07d0695d53d10bef6887d2f5f")
  10. add_deps("cmake")
  11. on_install(function (package)
  12. io.replace("CMakeLists.txt", "ADD_SUBDIRECTORY(test)", "", {plain = true})
  13. local configs = {}
  14. table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:is_debug() and "Debug" or "Release"))
  15. import("package.tools.cmake").install(package, configs)
  16. end)
  17. on_test(function (package)
  18. assert(package:check_cxxsnippets({test = [[
  19. void test() {
  20. limonp::StringFormat("format");
  21. }
  22. ]]}, {configs = {languages = "c++11"}, includes = "limonp/StringUtil.hpp"}))
  23. end)