summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2026-06-21 13:53:42 +0800
committerGitHub <[email protected]>2026-06-21 13:53:42 +0800
commit9ffe35f08b7a1be538e3529b5f4aacdd8bc4c8a7 (patch)
treee401d6d06719635c6e740c46d324bcb67d10866d
parent131fde08b2097c763e4548060ef537aa453864fa (diff)
parentf38aacc87fd1a94fb39755c9f74b8ba143e5dd7d (diff)
Merge pull request #7564 from Akylzhan/vcpkg_depend_info
fix vcpkg find_package in manifest mode
-rw-r--r--xmake/modules/package/manager/vcpkg/find_package.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/modules/package/manager/vcpkg/find_package.lua b/xmake/modules/package/manager/vcpkg/find_package.lua
index d14092854..5b515d8a2 100644
--- a/xmake/modules/package/manager/vcpkg/find_package.lua
+++ b/xmake/modules/package/manager/vcpkg/find_package.lua
@@ -221,6 +221,12 @@ function _find_package(vcpkg, vcpkgdir, name, opt)
end
local _, dependinfo = try { function () return os.iorunv(vcpkg, argv, manifest_mode and {curdir = opt.installdir} or nil) end }
+ if manifest_mode and not dependinfo then
+ -- fallback: newer vcpkg-tool no longer accepts the package name as a positional argument,
+ -- drop it and retry. see https://github.com/microsoft/vcpkg-tool/pull/1909
+ table.remove(argv, 3)
+ _, dependinfo = try { function () return os.iorunv(vcpkg, argv, {curdir = opt.installdir}) end }
+ end
if dependinfo then
for _, line in ipairs(dependinfo:split("\n", {plain = true})) do
if not line:startswith("vcpkg-") then