add vcpkg tool (#4219)
* add vcpkg tool * del some lines * add mark_as_pathenv * edit * Update xmake.lua * Update xmake.lua * Update xmake.lua * Update xmake.lua --------- Co-authored-by: SanQi <1459998132@.qq.com> Co-authored-by: ruki <waruqi@gmail.com>pull/4246/head
parent
56bcea100d
commit
70fd9ab5b2
1 changed files with 26 additions and 0 deletions
@ -0,0 +1,26 @@ |
||||
package("vcpkg") |
||||
set_kind("binary") |
||||
set_homepage("https://github.com/microsoft/vcpkg") |
||||
set_description("Vcpkg helps you manage C and C++ libraries on Windows, Linux and MacOS.") |
||||
set_license("MIT") |
||||
|
||||
add_urls("https://github.com/microsoft/vcpkg/archive/refs/tags/$(version).tar.gz") |
||||
add_versions("2024.05.24", "3034e534d4ed13e6e6edad3c331c0e9e3280f579dd4ba86151aa1e2896b85d31") |
||||
|
||||
add_deps("zip", "unzip", "cmake", "ninja", "curl") |
||||
|
||||
on_install("@linux", "@macosx", "@windows", function(package) |
||||
if package:is_plat("windows") then |
||||
os.vrun("bootstrap-vcpkg.bat") |
||||
else |
||||
os.vrunv("./bootstrap-vcpkg.sh", {shell = true}) |
||||
end |
||||
os.cp(".", package:installdir()) |
||||
package:setenv("VCPKG_ROOT", ".") |
||||
package:addenv("PATH", ".") |
||||
package:mark_as_pathenv("VCPKG_ROOT") |
||||
end) |
||||
|
||||
on_test(function(package) |
||||
os.vrun("vcpkg --help") |
||||
end) |
Loading…
Reference in new issue