summaryrefslogtreecommitdiff
path: root/xmake/rules/utils
diff options
context:
space:
mode:
authorruki <[email protected]>2021-11-13 13:46:36 +0800
committerruki <[email protected]>2021-11-13 13:46:36 +0800
commit6b684d5cc448124c31a51fff71e4043667677a57 (patch)
tree8ea5f63bf177eaad1e1d00d4f8533ac6dcd61cc3 /xmake/rules/utils
parent8907c57014dedbd68da377cb25a92096c0c713d8 (diff)
add frameworks for rust
Diffstat (limited to 'xmake/rules/utils')
-rw-r--r--xmake/rules/utils/inherit_links/inherit_links.lua12
1 files changed, 7 insertions, 5 deletions
diff --git a/xmake/rules/utils/inherit_links/inherit_links.lua b/xmake/rules/utils/inherit_links/inherit_links.lua
index 805f535d8..79c737503 100644
--- a/xmake/rules/utils/inherit_links/inherit_links.lua
+++ b/xmake/rules/utils/inherit_links/inherit_links.lua
@@ -80,11 +80,13 @@ function main(target)
-- @note we only export links for static target,
-- and we need pass `{public = true}` to add_packages/add_links/... to export it if want to export links for shared target
--
- if targetkind == "static" then
- for _, name in ipairs({"rpathdirs", "frameworkdirs", "frameworks", "linkdirs", "links", "syslinks"}) do
- local values = _get_values_from_target(target, name)
- if values and #values > 0 then
- target:add(name, values, {public = true})
+ if target:data("inherit.links.exportlinks") ~= false then
+ if targetkind == "static" then
+ for _, name in ipairs({"rpathdirs", "frameworkdirs", "frameworks", "linkdirs", "links", "syslinks"}) do
+ local values = _get_values_from_target(target, name)
+ if values and #values > 0 then
+ target:add(name, values, {public = true})
+ end
end
end
end