xmake.lua 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package("implot3d")
  2. set_homepage("https://github.com/brenocq/implot3d")
  3. set_description("Immediate Mode 3D Plotting")
  4. set_license("MIT")
  5. add_urls("https://github.com/brenocq/implot3d/archive/refs/tags/$(version).tar.gz",
  6. "https://github.com/brenocq/implot3d.git")
  7. add_versions("v0.2", "9b526ce01a9e9028e7d516b0699eee3c3b19d91d2dd6b546985e6a4b0bf700d4")
  8. add_deps("imgui")
  9. on_install(function (package)
  10. io.writefile("xmake.lua", [[
  11. add_requires("imgui")
  12. add_rules("mode.release", "mode.debug")
  13. target("implot3d")
  14. set_kind("$(kind)")
  15. set_languages("c++11")
  16. add_files("*.cpp|implot3d_demo.cpp")
  17. add_headerfiles("*.h")
  18. add_packages("imgui")
  19. if is_plat("windows") and is_kind("shared") then
  20. add_rules("utils.symbols.export_all", {export_classes = true})
  21. end
  22. ]])
  23. import("package.tools.xmake").install(package)
  24. end)
  25. on_test(function (package)
  26. assert(package:check_cxxsnippets({test = [[
  27. void test() {
  28. ImPlot3D::CreateContext();
  29. ImPlot3D::DestroyContext();
  30. }
  31. ]]}, {configs = {languages = "c++11"}, includes = "implot3d.h"}))
  32. end)