xmake.lua 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. package("plotlypp")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/jimmyorourke/plotlypp")
  4. set_description("Plotly for C++. A C++ interface to the Plotly.js figure spec, for creating interactive data visualizations.")
  5. set_license("MIT")
  6. add_urls("https://github.com/jimmyorourke/plotlypp.git")
  7. add_versions("2026.01.26", "8d9b250cbe1e2415d011af90e00f495def49712d")
  8. add_deps("cmake")
  9. add_deps("nlohmann_json", {configs = {cmake = true}})
  10. on_check("android", function (package)
  11. local ndk = package:toolchain("ndk"):config("ndkver")
  12. assert(ndk and tonumber(ndk) > 22, "package(plotlypp >=3.0.0) require ndk version > 22")
  13. end)
  14. on_install("!wasm and !bsd and !iphoneos", function (package)
  15. import("package.tools.cmake").install(package, {
  16. "-DPLOTLYPP_BUILD_EXAMPLES=OFF",
  17. })
  18. end)
  19. on_test(function (package)
  20. assert(package:check_cxxsnippets({test = [[
  21. void test() {
  22. auto figure = plotlypp::Figure();
  23. }
  24. ]]}, {configs = {languages = "c++20"}, includes = "plotlypp/figure.hpp"}))
  25. end)