summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua9
1 files changed, 7 insertions, 2 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 4bb80ebd5..57f7c1b78 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -390,9 +390,14 @@ end
-- add parents
function _instance:parents_add(...)
+ self._PARENTS = self._PARENTS or {}
for _, parent in ipairs({...}) do
- self._PARENTS = self._PARENTS or {}
- self._PARENTS[parent:name()] = parent
+ local parentpkgs = self._PARENTS[parent:name()]
+ if not parentpkgs then
+ parentpkgs = {}
+ self._PARENTS[parent:name()] = parentpkgs
+ end
+ table.insert(parentpkgs, parent)
end
end