xmake.lua 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  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.3", "8f0012043ea4ea56cb5ca9fc44731ad005637f0d3515a5ed3bead27f3096fb55")
  8. add_versions("v0.2", "9b526ce01a9e9028e7d516b0699eee3c3b19d91d2dd6b546985e6a4b0bf700d4")
  9. add_deps("imgui")
  10. on_install(function (package)
  11. io.writefile("xmake.lua", [[
  12. add_requires("imgui")
  13. add_rules("mode.release", "mode.debug")
  14. target("implot3d")
  15. set_kind("$(kind)")
  16. set_languages("c++11")
  17. add_files("*.cpp|implot3d_demo.cpp")
  18. add_headerfiles("*.h")
  19. add_packages("imgui")
  20. if is_plat("windows") and is_kind("shared") then
  21. add_rules("utils.symbols.export_all", {export_classes = true})
  22. end
  23. ]])
  24. import("package.tools.xmake").install(package)
  25. end)
  26. on_test(function (package)
  27. assert(package:check_cxxsnippets({test = [[
  28. void test() {
  29. ImPlot3D::CreateContext();
  30. ImPlot3D::DestroyContext();
  31. }
  32. ]]}, {configs = {languages = "c++11"}, includes = "implot3d.h"}))
  33. end)