diff options
| author | ruki <[email protected]> | 2025-01-09 00:50:52 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-01-09 00:50:52 +0800 |
| commit | ed685ecd74c5267781713f3bd00ce4e4e40b27d7 (patch) | |
| tree | 3e3e9bee672f1570ac4712edb31c2fd2d5abb27d /xmake/core/project/project.lua | |
| parent | a74774a809de30e6e473157233aa47bbabb272d4 (diff) | |
add namespace to sandbox
Diffstat (limited to 'xmake/core/project/project.lua')
| -rw-r--r-- | xmake/core/project/project.lua | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index 61c1361db..ee2b55a63 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -979,8 +979,16 @@ function project.ordertargets() end -- get the given option -function project.option(name) - return project.options()[name] +function project.option(name, opt) + opt = opt or {} + local options = project.options() + if options then + local o = options[name] + if not o and opt.namespace then + o = options[opt.namespace .. "::" .. name] + end + return o + end end -- get options |
