summaryrefslogtreecommitdiff
path: root/xmake/modules/private/action/require/impl/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2024-10-24 22:39:51 +0800
committerruki <[email protected]>2024-10-24 22:39:51 +0800
commit13c88acff1ee187c5df4382b0f9f603552fefc94 (patch)
treef7fca3138128de8ebe4a8014151b23643363c6a0 /xmake/modules/private/action/require/impl/package.lua
parentb3c6d968249e01ce2b00417c4d63ae524e883afd (diff)
improve require name
Diffstat (limited to 'xmake/modules/private/action/require/impl/package.lua')
-rw-r--r--xmake/modules/private/action/require/impl/package.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua
index 721025344..34d7f8d22 100644
--- a/xmake/modules/private/action/require/impl/package.lua
+++ b/xmake/modules/private/action/require/impl/package.lua
@@ -149,8 +149,7 @@ function _load_require(require_str, requires_extra, parentinfo)
require_extra = requires_extra[require_str] or {}
end
-
- -- parse configs from package name
+ -- parse configs from package name, and we need to ignore 3rd package name, e.g. vcpkg::boost[core], ...
-- @see https://github.com/xmake-io/xmake/issues/5727#issuecomment-2421040107
--
-- e.g.
@@ -158,7 +157,7 @@ function _load_require(require_str, requires_extra, parentinfo)
-- add_requires("libplist[shared,debug,codecs=[foo,bar,zoo]]")
--
local packagename_raw, configs_str = packagename:match("(.-)%[(.*)%]")
- if packagename_raw and configs_str then
+ if packagename_raw and configs_str and not packagename:find("::", 1, true) then
configs_str = configs_str:gsub("%[(.*)%]", function (w)
return w:replace(",", ":")
end)