From ed685ecd74c5267781713f3bd00ce4e4e40b27d7 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 9 Jan 2025 00:50:52 +0800 Subject: add namespace to sandbox --- xmake/core/project/project.lua | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'xmake/core/project/project.lua') 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 -- cgit v1.3.1