diff options
| author | ruki <[email protected]> | 2023-09-28 22:56:17 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2023-09-28 22:56:17 +0800 |
| commit | 2aa8a4a793f3a7281487d6bc8334f975fa6bd26d (patch) | |
| tree | b9ecd6a5d7bfab13cf702b97a8a14c4164f2dc66 /xmake/core/base/scopeinfo.lua | |
| parent | 6ffb48dd54c6d2d4e6168fac56943481d58e29c4 (diff) | |
add whole groups
Diffstat (limited to 'xmake/core/base/scopeinfo.lua')
| -rw-r--r-- | xmake/core/base/scopeinfo.lua | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/xmake/core/base/scopeinfo.lua b/xmake/core/base/scopeinfo.lua index 8254ffc98..0ca401237 100644 --- a/xmake/core/base/scopeinfo.lua +++ b/xmake/core/base/scopeinfo.lua @@ -210,10 +210,11 @@ function _instance:_api_set_groups(name, ...) scope[name] = values -- save extra config - if extra_config and extra_config.name then + if extra_config then scope["__extra_" .. name] = scope["__extra_" .. name] or {} local extrascope = scope["__extra_" .. name] - extrascope[extra_config.name] = extra_config + local key = table.concat(values, "_") + extrascope[key] = extra_config end end @@ -241,10 +242,11 @@ function _instance:_api_add_groups(name, ...) scope[name] = self:_api_handle(name, scope[name]) -- save extra config - if extra_config and extra_config.name then + if extra_config then scope["__extra_" .. name] = scope["__extra_" .. name] or {} local extrascope = scope["__extra_" .. name] - extrascope[extra_config.name] = extra_config + local key = table.concat(values, "_") + extrascope[key] = extra_config end end @@ -690,6 +692,9 @@ function _instance:extraconf(name, item, key) local value = extraconf if item then value = extraconf and extraconf[item] or nil + if value == nil and extraconf and type(item) == "table" then + value = extraconf[table.concat(item, "_")] + end if value and key then value = value[key] end |
