diff options
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 |
