diff options
Diffstat (limited to 'xmake/core/package/package.lua')
| -rw-r--r-- | xmake/core/package/package.lua | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua index b96671fe8..51fd8ab01 100644 --- a/xmake/core/package/package.lua +++ b/xmake/core/package/package.lua @@ -203,7 +203,7 @@ end -- get the directory of this package function _instance:directory() - return path.join(package.installdir(self:from("global")), self:name():sub(1, 1):lower(), self:name(), self:version_str()) + return path.join(package.installdir(self:from("global")), self:name():sub(1, 1):lower(), self:name(), self:version_str(), self:debug() and "debug" or "release") end -- get versions @@ -273,8 +273,8 @@ end -- set the require info function _instance:requireinfo_set(requireinfo) self._REQUIREINFO = requireinfo - -- switch to local package if exists package configuration - if requireinfo and requireinfo.config then + -- switch to local package if exists package configuration or debug package + if requireinfo and (requireinfo.config or requireinfo.debug) then self._FROMKIND = "local" end end @@ -299,6 +299,12 @@ function _instance:optional() return requireinfo and requireinfo.optional or false end +-- is debug package? +function _instance:debug() + local requireinfo = self:requireinfo() + return requireinfo and requireinfo.debug or false +end + -- is supported package? function _instance:supported() -- attempt to get the build script with the current plat/arch |
