summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2017-09-16 13:27:29 +0800
committerruki <[email protected]>2017-09-16 13:27:29 +0800
commitd29d3d91682bbb1552e4aee5f8b21a6a92eaf674 (patch)
tree545b205b64edd91765ecc655f493a28b8010f0c0
parent7b0e6f7212368a31ab4a058c81ba0a7f2b223908 (diff)
modify package directory
-rw-r--r--xmake/actions/config/scanner.lua2
-rw-r--r--xmake/core/package/package.lua16
2 files changed, 2 insertions, 16 deletions
diff --git a/xmake/actions/config/scanner.lua b/xmake/actions/config/scanner.lua
index c66b2a917..0f48d5947 100644
--- a/xmake/actions/config/scanner.lua
+++ b/xmake/actions/config/scanner.lua
@@ -71,8 +71,6 @@ function make()
-- project not found
if #sourcefiles == 0 and #sourcefiles_main == 0 then
-
- -- error
raise("project not found!")
end
diff --git a/xmake/core/package/package.lua b/xmake/core/package/package.lua
index 0f46f9505..fb07bf517 100644
--- a/xmake/core/package/package.lua
+++ b/xmake/core/package/package.lua
@@ -167,13 +167,7 @@ end
-- get the cached directory of this package
function _instance:cachedir()
- local version_str = self:version_str()
- if version_str then
- version_str = "-" .. version_str
- else
- version_str = ""
- end
- return path.join(package.cachedir(), self:fullname() .. version_str)
+ return path.join(package.cachedir(), self:fullname(), self:version_str())
end
-- get the installed directory of this package
@@ -185,13 +179,7 @@ function _instance:installdir()
end
-- make install directory
- local version_str = self:version_str()
- if version_str then
- version_str = "-" .. version_str
- else
- version_str = ""
- end
- return path.join(package.installdir(self:from("global")), self:fullname() .. version_str)
+ return path.join(package.installdir(self:from("global")), self:fullname(), self:version_str())
end
-- get the version