summaryrefslogtreecommitdiff
path: root/xmake/core/tool/builder.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2017-08-16 09:15:45 +0800
committerruki <[email protected]>2017-08-16 09:15:45 +0800
commit66299aec15e67cb7d96ecc580b29b3441b399dfa (patch)
treeddf4dde3dbab466b0f8a31897e064932a0106d9c /xmake/core/tool/builder.lua
parentb92d83c523045d7e8b716dc0610b88b0d357575f (diff)
improve add_deps to add inherit config
Diffstat (limited to 'xmake/core/tool/builder.lua')
-rw-r--r--xmake/core/tool/builder.lua7
1 files changed, 4 insertions, 3 deletions
diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua
index d67d407ce..7d02930f0 100644
--- a/xmake/core/tool/builder.lua
+++ b/xmake/core/tool/builder.lua
@@ -137,9 +137,10 @@ function builder:_inherit_from_targetdeps(results, target, flagname)
local dep = orderdeps[total + 1 - idx]
-- is static or shared target library? link it
- local depkind = dep:get("kind")
- local targetkind = target:get("kind")
- if depkind == "static" or depkind == "shared" then
+ local depkind = dep:get("kind")
+ local targetkind = target:get("kind")
+ local depconfig = table.wrap(target:depconfig(dep:name()))
+ if (depkind == "static" or depkind == "shared") and (depconfig.inherit == nil or depconfig.inherit) then
if flagname == "links" and (targetkind == "binary" or targetkind == "shared") then
-- add dependent link