diff options
| -rw-r--r-- | xmake/modules/package/manager/vcpkg/find_package.lua | 6 |
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 |
