diff options
| author | ruki <[email protected]> | 2023-10-24 22:34:36 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-10-24 22:34:36 +0800 |
| commit | 795272da127f97058d2d061e32ace82a8c2ff009 (patch) | |
| tree | e2f728c8dee7c98c6e93b0e66949e498cae176a4 /xmake/core/package/package.lua | |
| parent | ca2b119caae6424449875117966cb36341733862 (diff) | |
save extra info for package
Diffstat (limited to 'xmake/core/package/package.lua')
| -rw-r--r-- | xmake/core/package/package.lua | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index a51a3404e..28d66f7ca 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -902,6 +902,7 @@ function _instance:manifest_save() -- save global variables and component variables local vars + local extras local components local apis = language.apis() for _, apiname in ipairs(table.join(apis.values, apis.paths)) do @@ -911,6 +912,8 @@ function _instance:manifest_save() if value ~= nil then vars = vars or {} vars[name] = value + extras = extras or {} + extras[name] = self:extraconf(name) end for _, component_name in ipairs(table.wrap(self:get("components"))) do local comp = self:component(component_name) @@ -922,11 +925,18 @@ function _instance:manifest_save() components.vars[component_name] = components.vars[component_name] or {} components.vars[component_name][name] = component_value end + local component_extra = comp:extraconf(name) + if component_extra then + components.extras = components.extras or {} + components.extras[component_name] = components.extras[component_name] or {} + components.extras[component_name][name] = component_extra + end end end end end manifest.vars = vars + manifest.extras = extras manifest.components = components -- save repository |
