xmake.lua 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package("rlimgui")
  2. set_homepage("https://github.com/raylib-extras/rlImGui")
  3. set_description("A Raylib integration with DearImGui")
  4. set_license("zlib")
  5. add_urls("https://github.com/raylib-extras/rlImGui.git")
  6. add_versions("2025.11.27", "dc7f97679a024eee8f5f009e77cc311748200415")
  7. if is_plat("windows") then
  8. add_configs("shared", {description = "Build shared library.", default = false, type = "boolean", readonly = true})
  9. end
  10. add_deps("raylib")
  11. add_deps("imgui", {configs = {docking = true, wchar32 = true}})
  12. on_install("!cross and !bsd and !iphoneos", function (package)
  13. io.writefile("xmake.lua", [[
  14. add_rules("mode.debug", "mode.release")
  15. set_languages("c99", "c++17")
  16. add_requires("raylib")
  17. add_requires("imgui", {configs = {docking = true, wchar32 = true}})
  18. if is_plat("linux") then
  19. add_defines("_GLFW_X11", "_GNU_SOURCE")
  20. end
  21. target("rlImGui")
  22. set_kind("$(kind)")
  23. add_files("*.cpp")
  24. add_headerfiles("*.h", "(extras/**.h)")
  25. add_includedirs(".", {public = true})
  26. add_packages("raylib", "imgui")
  27. add_defines("IMGUI_DISABLE_OBSOLETE_FUNCTIONS", "IMGUI_DISABLE_OBSOLETE_KEYIO")
  28. ]])
  29. import("package.tools.xmake").install(package)
  30. end)
  31. on_test(function (package)
  32. assert(package:check_cxxsnippets({test = [[
  33. void test() {
  34. rlImGuiBegin();
  35. }
  36. ]]}, {includes = {"rlImGui.h"}, configs = {languages = "c++17"}}))
  37. end)