xmake.lua 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. package("doxygen")
  2. set_kind("binary")
  3. set_homepage("https://www.doxygen.nl/")
  4. set_license("GPL-2.0")
  5. add_urls("https://doxygen.nl/files/doxygen-$(version).src.tar.gz", {alias = "archive"})
  6. add_urls("https://github.com/doxygen/doxygen/releases/download/Release_$(version).src.tar.gz", {
  7. alias = "archive",
  8. version = function (version) return format("%s/doxygen-%s", version:gsub("%.", "_"), version) end
  9. })
  10. add_urls("https://github.com/doxygen/doxygen.git", {alias = "github"})
  11. add_versions("archive:1.10.0", "dd7c556b4d96ca5e682534bc1f1a78a5cfabce0c425b14c1b8549802686a4442")
  12. add_versions("archive:1.9.6", "297f8ba484265ed3ebd3ff3fe7734eb349a77e4f95c8be52ed9977f51dea49df")
  13. add_versions("archive:1.9.5", "55b454b35d998229a96f3d5485d57a0a517ce2b78d025efb79d57b5a2e4b2eec")
  14. add_versions("archive:1.9.3", "f352dbc3221af7012b7b00935f2dfdc9fb67a97d43287d2f6c81c50449d254e0")
  15. add_versions("github:1.10.0", "Release_1_10_0")
  16. add_versions("github:1.9.6", "Release_1_9_6")
  17. add_versions("github:1.9.5", "Release_1_9_5")
  18. add_versions("github:1.9.3", "Release_1_9_3")
  19. add_versions("github:1.9.2", "Release_1_9_2")
  20. add_versions("github:1.9.1", "Release_1_9_1")
  21. if not is_plat("windows") then
  22. add_deps("cmake", "bison >=2.7", "flex", {private = true})
  23. add_deps("python 3.x", {kind = "binary", private = true})
  24. end
  25. on_load("@windows", function (package)
  26. if package:is_built() then
  27. package:add("deps", "cmake", "bison >=2.7", "flex")
  28. package:add("deps", "python 3.x", {kind = "binary"})
  29. end
  30. end)
  31. on_install("@windows", "@macosx", "@linux", function (package)
  32. local configs = {}
  33. local cxflags = {}
  34. if package:is_plat("windows") then
  35. -- these 2 flags are required to make doxygen compile on windows
  36. table.insert(cxflags, "/utf-8")
  37. table.insert(cxflags, "/DGHC_WITH_EXCEPTIONS")
  38. table.insert(cxflags, "/EHsc") -- to reduce warnings
  39. end
  40. os.rm("templates/*/PaxHeader")
  41. import("package.tools.cmake").install(package, configs, {cxflags = cxflags, jobs = 1})
  42. end)
  43. on_test(function (package)
  44. os.vrun("doxygen -v")
  45. end)