xmake.lua 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. package("imcoolbar")
  2. set_homepage("https://github.com/aiekick/ImCoolBar")
  3. set_description("A Cool bar for Dear ImGui")
  4. set_license("MIT")
  5. add_urls("https://github.com/aiekick/ImCoolBar.git")
  6. add_versions("2023.07.05", "ab1f9c7e4325b89b485e1ce581a22533e0e7b8ad")
  7. add_deps("imgui docking")
  8. on_install("windows", "linux", "macosx", "mingw", "android", "iphoneos", function (package)
  9. local configs = {}
  10. io.writefile("xmake.lua", [[
  11. add_requires("imgui docking")
  12. add_rules("mode.release", "mode.debug")
  13. target("imcoolbar")
  14. set_kind("$(kind)")
  15. set_languages("c++11")
  16. add_files("ImCoolbar.cpp")
  17. add_headerfiles("ImCoolbar.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. if package:config("shared") then
  24. configs.kind = "shared"
  25. end
  26. import("package.tools.xmake").install(package, configs)
  27. end)
  28. on_test(function (package)
  29. assert(package:check_cxxsnippets({test = [[
  30. #include <ImCoolbar.h>
  31. void test() {
  32. ImGui ::CoolBarItem();
  33. }
  34. ]]}, {configs = {languages = "c++11"}}))
  35. end)