summaryrefslogtreecommitdiff
path: root/xmake/core/tool/builder.lua
diff options
context:
space:
mode:
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