xmake.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. package("xlnt")
  2. set_homepage("https://github.com/tfussell/xlnt")
  3. set_description("Cross-platform user-friendly xlsx library for C++11+")
  4. set_license("MIT")
  5. add_urls("https://github.com/tfussell/xlnt.git")
  6. add_versions("2023.03.02", "297b331435d6dee09bf89c8a5ad974b01f18039b")
  7. add_configs("python", {description = "Build Arrow conversion functions", default = true, type = "boolean", readonly = true})
  8. add_deps("cmake")
  9. add_links("xlnt")
  10. on_install(function (package)
  11. local configs = {}
  12. table.insert(configs, "-DCMAKE_BUILD_TYPE=" .. (package:debug() and "Debug" or "Release"))
  13. table.insert(configs, "-DBUILD_SHARED_LIBS=" .. (package:config("shared") and "ON" or "OFF"))
  14. import("package.tools.cmake").install(package, configs)
  15. end)
  16. on_test(function (package)
  17. assert(package:check_cxxsnippets({test = [[
  18. #include <xlnt/xlnt.hpp>
  19. void test(){
  20. xlnt::workbook wb;
  21. xlnt::worksheet ws = wb.active_sheet();
  22. ws.cell("A1").value(5);
  23. wb.save("example.xlsx");
  24. }
  25. ]]}, {configs = {languages = "c++14"}}))
  26. end)