summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-09-18 22:35:28 +0800
committerruki <[email protected]>2018-09-18 09:32:50 +0800
commit5beacb69348c80688db553c0b671c76237866a49 (patch)
tree095a0e3e754bab81d5ae1dcb2b1b6dc390ab8d06 /xmake/core/package/package.lua
parentb39865ce22ec806099bd022f47fcb90a4ac42034 (diff)
modify debug package path
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua12
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