xmake.lua 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. package("boostdep")
  2. set_kind("binary")
  3. set_homepage("https://boost.org/tools/boostdep")
  4. set_description("A tool to create Boost module dependency reports")
  5. set_license("BSL-1.0")
  6. add_urls("https://github.com/boostorg/boostdep.git")
  7. add_versions("2024.10.07", "289f2a16286e62348676f2abb75c0bd9968f156b")
  8. add_deps("boost", {configs = {filesystem = true}})
  9. on_install(function (package)
  10. io.writefile("xmake.lua", [[
  11. add_rules("mode.debug", "mode.release")
  12. add_requires("boost", {configs = {filesystem = true}})
  13. add_packages("boost")
  14. set_languages("c++17")
  15. target("boostdep")
  16. set_kind("binary")
  17. add_files("src/*.cpp")
  18. ]])
  19. import("package.tools.xmake").install(package)
  20. end)
  21. on_test(function (package)
  22. local boostdep = package:installdir("bin/boostdep")
  23. if is_host("windows") then
  24. boostdep = boostdep .. ".exe"
  25. end
  26. assert(os.isexec(boostdep), "boostdep not found!")
  27. end)