summaryrefslogtreecommitdiff
path: root/xmake/core/package/package.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-09-14 00:41:45 +0800
committerruki <[email protected]>2018-09-13 22:10:31 +0800
commitd07c0752aea017f1d0f26b1c95d4e4971dfce486 (patch)
tree1ddb957da400f4af7eaff6d9a5587176a94aa52c /xmake/core/package/package.lua
parent9b9f4ca9fe943bbc9e32aa5d6eb1ffb5f87841df (diff)
improve the package install directory
Diffstat (limited to 'xmake/core/package/package.lua')
-rw-r--r--xmake/core/package/package.lua12
1 files changed, 10 insertions, 2 deletions
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 8a286b2cc..cdd853257 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -168,8 +168,16 @@ function _instance:cachedir()
end
-- get the installed directory of this package
-function _instance:installdir()
- return path.join(self:directory(), "install")
+function _instance:installdir(...)
+
+ -- make the given install directory
+ local dir = path.join(self:directory(), "install", ...)
+
+ -- ensure the install directory
+ if not os.isdir(dir) then
+ os.mkdir(dir)
+ end
+ return dir
end
-- get the downloaded original file