Skip to content

Commit 9ffe35f

Browse files
authored
Merge pull request #7564 from Akylzhan/vcpkg_depend_info
fix vcpkg find_package in manifest mode
2 parents 131fde0 + f38aacc commit 9ffe35f

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

xmake/modules/package/manager/vcpkg/find_package.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,6 +221,12 @@ function _find_package(vcpkg, vcpkgdir, name, opt)
221221
end
222222

223223
local _, dependinfo = try { function () return os.iorunv(vcpkg, argv, manifest_mode and {curdir = opt.installdir} or nil) end }
224+
if manifest_mode and not dependinfo then
225+
-- fallback: newer vcpkg-tool no longer accepts the package name as a positional argument,
226+
-- drop it and retry. see https://github.com/microsoft/vcpkg-tool/pull/1909
227+
table.remove(argv, 3)
228+
_, dependinfo = try { function () return os.iorunv(vcpkg, argv, {curdir = opt.installdir}) end }
229+
end
224230
if dependinfo then
225231
for _, line in ipairs(dependinfo:split("\n", {plain = true})) do
226232
if not line:startswith("vcpkg-") then

0 commit comments

Comments
 (0)