diff options
| author | ruki <[email protected]> | 2019-11-09 10:21:25 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-11-09 10:21:25 +0800 |
| commit | c93a4ee207b499f9f869ef265e97fc5b1e40cd99 (patch) | |
| tree | f4c514731b7850d6d7c61befe3b5a2e35feb5de9 /xmake/actions/require/impl/package.lua | |
| parent | 50c681f8a8257ad5778a9e1a9069380f7fdb0223 (diff) | |
inherit vs_runtime for static deps
Diffstat (limited to 'xmake/actions/require/impl/package.lua')
| -rw-r--r-- | xmake/actions/require/impl/package.lua | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua index 553b041ec..139ebc3e5 100644 --- a/xmake/actions/require/impl/package.lua +++ b/xmake/actions/require/impl/package.lua @@ -374,8 +374,26 @@ function _load_packages(requires, opt) if not package._DEPS then local deps = package:get("deps") if deps and opt.nodeps ~= true then + + -- get the extra configs dependent packages and inherit some builtin configs + local extraconfs = package:extraconf("deps") or {} + if not package:config("shared") then + for _, depstr in ipairs(deps) do + local depconf = extraconfs[depstr] + if not depconf then + depconf = {} + extraconfs[depstr] = depconf + end + depconf.configs = depconf.configs or {} + if depconf.configs.vs_runtime == nil then + depconf.configs.vs_runtime = package:config("vs_runtime") + end + end + end + + -- load dependent packages local packagedeps = {} - for _, dep in ipairs(_load_packages(deps, {requires_extra = package:get("__extra_deps"), parentinfo = requireinfo.info, nodeps = opt.nodeps})) do + for _, dep in ipairs(_load_packages(deps, {requires_extra = extraconfs, parentinfo = requireinfo.info, nodeps = opt.nodeps})) do dep:parents_add(package) table.insert(packages, dep) packagedeps[dep:name()] = dep |
