xmake.lua 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. package("duilib_ultimate")
  2. set_homepage("https://github.com/qdtroy/DuiLib_Ultimate")
  3. set_description("DuiLib_Ultimate is the Optimized version for duilib library")
  4. set_license("MIT")
  5. add_urls("https://github.com/qdtroy/DuiLib_Ultimate/archive/refs/tags/$(version).tar.gz",
  6. "https://github.com/qdtroy/DuiLib_Ultimate.git")
  7. add_versions("0.3", "4a650267e98d8b19818bdeb7675dcf1403017732b961620678e1d2d81f81db91")
  8. add_configs("unicode", {description = "Enable Unicode support.", default = true, type = "boolean"})
  9. add_syslinks("gdi32", "comctl32", "imm32", "uuid", "winmm")
  10. on_install("windows|!arm64", function (package)
  11. local configs = {unicode = package:config("unicode")}
  12. if not package:config("shared") then
  13. package:add("defines", "UILIB_STATIC")
  14. end
  15. if configs.unicode then
  16. package:add("defines", "UNICODE", "_UNICODE")
  17. end
  18. os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua")
  19. import("package.tools.xmake").install(package, configs)
  20. os.cp("bin", package:installdir())
  21. end)
  22. on_test(function (package)
  23. assert(package:check_cxxsnippets({test = [[
  24. #include "UIlib.h"
  25. using namespace DuiLib;
  26. void test() {
  27. CButtonUI *pButton = new CButtonUI();
  28. }
  29. ]]}))
  30. end)