xmake.lua 955 B

123456789101112131415161718192021222324252627
  1. package("raygui")
  2. set_kind("library", {headeronly = true})
  3. set_homepage("https://github.com/raysan5/raygui")
  4. set_description("A simple and easy-to-use immediate-mode gui library")
  5. set_license("zlib")
  6. add_urls("https://github.com/raysan5/raygui/archive/refs/tags/$(version).tar.gz",
  7. "https://github.com/raysan5/raygui.git")
  8. add_versions("3.0", "a510eb6efb524dfc8a1a7072bab3d4182a550f9fe86d315ff13a59cfc707f877")
  9. add_deps("raylib 4.x")
  10. add_defines("RAYGUI_IMPLEMENTATION")
  11. on_install("windows", "linux", "macosx", function (package)
  12. os.cp("src/*", package:installdir("include"))
  13. end)
  14. on_test(function (package)
  15. assert(package:check_csnippets({test = [[
  16. #include <raygui.h>
  17. void test() {
  18. InitWindow(100, 100, "hello world!");
  19. GuiSetStyle(TEXTBOX, TEXT_ALIGNMENT, GUI_TEXT_ALIGN_CENTER);
  20. }
  21. ]]}))
  22. end)