xmake.lua 1.0 KB

123456789101112131415161718192021222324252627
  1. package("vcpkg")
  2. set_kind("binary")
  3. set_homepage("https://github.com/microsoft/vcpkg")
  4. set_description("Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS.")
  5. set_license("MIT")
  6. add_urls("https://github.com/microsoft/vcpkg/archive/refs/tags/$(version).tar.gz")
  7. add_versions("2024.07.12", "7da785e42b7487fb0e7465188f12c6ce0dfa760ab334d0f4f708bd1fc54081b1")
  8. add_versions("2024.05.24", "3034e534d4ed13e6e6edad3c331c0e9e3280f579dd4ba86151aa1e2896b85d31")
  9. add_deps("zip", "unzip", "cmake", "ninja", "curl")
  10. on_install("@linux", "@macosx", "@windows", function(package)
  11. if package:is_plat("windows") then
  12. os.vrun("bootstrap-vcpkg.bat")
  13. else
  14. os.vrunv("./bootstrap-vcpkg.sh", {shell = true})
  15. end
  16. os.cp(".", package:installdir())
  17. package:setenv("VCPKG_ROOT", ".")
  18. package:addenv("PATH", ".")
  19. package:mark_as_pathenv("VCPKG_ROOT")
  20. end)
  21. on_test(function(package)
  22. os.vrun("vcpkg --help")
  23. end)