From 44441cbd19a5a0989ddc2c42dde5f32174f414fe Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 5 Jan 2021 22:41:53 +0800 Subject: improve to load depconfigs --- xmake/actions/require/impl/package.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xmake/actions/require/impl/package.lua b/xmake/actions/require/impl/package.lua index 88d7701cf..e0c37fb6e 100644 --- a/xmake/actions/require/impl/package.lua +++ b/xmake/actions/require/impl/package.lua @@ -566,7 +566,7 @@ function _load_package_depconfigs(package) -- get all extra configs of dependent packages local extraconfs = package:extraconf("deps") or {} - -- inherit some builtin configs of root package + -- inherit some builtin configs of root package if these config values are not default value -- e.g. add_requires("libpng", {configs = {vs_runtime = "MD", pic = false}}) -- local deps = package:get("deps") @@ -578,10 +578,10 @@ function _load_package_depconfigs(package) extraconfs[depstr] = depconf end depconf.configs = depconf.configs or {} - if depconf.configs.vs_runtime == nil then + if depconf.configs.vs_runtime == nil and package:config("vs_runtime") ~= "MT" then depconf.configs.vs_runtime = package:config("vs_runtime") end - if depconf.configs.pic == nil then + if depconf.configs.pic == nil and package:config("pic") ~= true then depconf.configs.pic = package:config("pic") end end -- cgit v1.3.1