From c03f3c5fbb20377215ea4c1c7240b4fc3da7722f Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 12 Mar 2026 23:52:08 +0800 Subject: fix vcpkg dependinfo --- xmake/modules/package/manager/vcpkg/find_package.lua | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/xmake/modules/package/manager/vcpkg/find_package.lua b/xmake/modules/package/manager/vcpkg/find_package.lua index c839a8758..563521889 100644 --- a/xmake/modules/package/manager/vcpkg/find_package.lua +++ b/xmake/modules/package/manager/vcpkg/find_package.lua @@ -189,8 +189,15 @@ function _find_package(vcpkg, vcpkgdir, name, opt) end -- find dependency package + -- pass features to depend-info to get the complete dependency tree + -- e.g. curl[mbedtls] needs mbedtls libraries + -- @see https://github.com/xmake-io/xmake/issues/7388 + local depend_name = name + if required_features then + depend_name = name .. "[" .. table.concat(required_features, ",") .. "]" + end local result = nil - local _, dependinfo = try { function () return os.iorunv(vcpkg, {"depend-info", name, "--sort=reverse", "--triplet=" .. triplet}) end } + local _, dependinfo = try { function () return os.iorunv(vcpkg, {"depend-info", depend_name, "--sort=reverse", "--triplet=" .. triplet}) end } if dependinfo then for _, line in ipairs(dependinfo:split("\n", {plain = true})) do if not line:startswith("vcpkg-") then -- cgit v1.3.1