diff options
Diffstat (limited to 'xmake/core/project/package.lua')
| -rw-r--r-- | xmake/core/project/package.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/xmake/core/project/package.lua b/xmake/core/project/package.lua index 70f89a1f8..67000bdc6 100644 --- a/xmake/core/project/package.lua +++ b/xmake/core/project/package.lua @@ -69,6 +69,12 @@ function _instance:name() return self._NAME end +-- get the full name +function _instance:fullname() + local namespace = self:namespace() + return namespace and namespace .. "::" .. self:name() or self:name() +end + -- get the package version function _instance:version() @@ -107,6 +113,11 @@ function _instance:requirestr() return self:get("__requirestr") end +-- get the namespace +function _instance:namespace() + return self:get("__namespace") +end + -- get the require configuration from the given name -- -- e.g. @@ -369,7 +380,7 @@ end -- we need to sort package set keys by this string -- @see https://github.com/xmake-io/xmake/pull/2971#issuecomment-1290052169 function _instance:__tostring() - return "<package: " .. self:name() .. ">" + return "<package: " .. self:fullname() .. ">" end -- get cache |
