diff options
| -rw-r--r-- | xmake/modules/private/action/require/impl/package.lua | 36 |
1 files changed, 20 insertions, 16 deletions
diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua index b030f7eec..178fd4542 100644 --- a/xmake/modules/private/action/require/impl/package.lua +++ b/xmake/modules/private/action/require/impl/package.lua @@ -183,6 +183,26 @@ function _load_require(require_str, requires_extra, opt) end end + -- resolve require info + local resolvedinfo = opt.resolvedinfo + local requirepath = opt.requirepath + if requirepath then + requirepath = requirepath .. "." .. packagename + else + requirepath = packagename + end + resolvedinfo = resolvedinfo and resolvedinfo[requirepath] + if resolvedinfo then + -- resolve the conflict package version + if resolvedinfo.version then + version = resolvedinfo.version + end + -- resolve the conflict package configs + if resolvedinfo.configs then + require_extra.configs = resolvedinfo.configs + end + end + -- get required building configurations -- we need to clone a new configs object, because the whole requireinfo will be modified later. -- @see https://github.com/xmake-io/xmake-repo/pull/2067 @@ -216,22 +236,6 @@ function _load_require(require_str, requires_extra, opt) require_extra.system = false end - -- resolve require info - local resolvedinfo = opt.resolvedinfo - local requirepath = opt.requirepath - if requirepath then - requirepath = requirepath .. "." .. packagename - else - requirepath = packagename - end - resolvedinfo = resolvedinfo and resolvedinfo[requirepath] - if resolvedinfo then - -- resolve the conflict package version - if resolvedinfo.version then - version = resolvedinfo.version - end - end - -- init required item local required = {} local parentinfo = opt.parentinfo |
