diff options
| -rw-r--r-- | xmake/core/project/target.lua | 3 | ||||
| -rw-r--r-- | xmake/core/tool/builder.lua | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua index 95d5bffd1..a24427d4b 100644 --- a/xmake/core/project/target.lua +++ b/xmake/core/project/target.lua @@ -542,6 +542,9 @@ function target:packages() for _, name in ipairs(table.wrap(self:get("packages"))) do local package = requireinfo.load(name) if package and package:enabled() then + if package:extra("nolink") then + package:set("links", nil) + end table.insert(self._PACKAGES, package) end end diff --git a/xmake/core/tool/builder.lua b/xmake/core/tool/builder.lua index 4f332b9ab..bc6d16aa4 100644 --- a/xmake/core/tool/builder.lua +++ b/xmake/core/tool/builder.lua @@ -122,6 +122,9 @@ function builder:_inherit_from_target(values, target, name) for _, opt in ipairs(target:options()) do table.join2(values, opt:get(name)) end + for _, opt in ipairs(target:packages()) do + table.join2(values, opt:get(name)) + end end end |
