diff options
| author | ruki <[email protected]> | 2026-03-12 23:52:08 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-03-12 23:52:08 +0800 |
| commit | c03f3c5fbb20377215ea4c1c7240b4fc3da7722f (patch) | |
| tree | 027ec2f3681f06b18cd1dc2de89a601aa05da2d2 | |
| parent | d112f69b237378da0e655ddb9bacb55a3502c2a7 (diff) | |
fix vcpkg dependinfo
| -rw-r--r-- | xmake/modules/package/manager/vcpkg/find_package.lua | 9 |
1 files changed, 8 insertions, 1 deletions
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 |
