summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-09-25 00:46:30 +0800
committerruki <[email protected]>2018-09-24 22:39:01 +0800
commitcebceaaee1a3954ed86f4462f0be01c464a17af8 (patch)
tree5367955dcd992a5ab37dbaf4e4078fb57f8022fe
parentba4ba0bf697cfc2b95edbd53d9301bbbb3803129 (diff)
add plat directory to buildir
-rw-r--r--xmake/core/project/target.lua42
1 files changed, 30 insertions, 12 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index b35c80ae4..ced59bee7 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -522,10 +522,10 @@ function target:objectdir()
objectdir = path.join(config.buildir(), ".objs", self:name())
end
- -- append mode sub-directory
- local mode = config.get("mode")
- if mode then
- objectdir = path.join(objectdir, mode)
+ -- append plat sub-directory
+ local plat = config.get("plat")
+ if plat then
+ objectdir = path.join(objectdir, plat)
end
-- append arch sub-directory
@@ -533,6 +533,12 @@ function target:objectdir()
if arch then
objectdir = path.join(objectdir, arch)
end
+
+ -- append mode sub-directory
+ local mode = config.get("mode")
+ if mode then
+ objectdir = path.join(objectdir, mode)
+ end
-- ok?
return objectdir
@@ -544,10 +550,10 @@ function target:dependir()
-- init the dependent directory
local dependir = path.join(config.buildir(), ".deps", self:name())
- -- append mode sub-directory
- local mode = config.get("mode")
- if mode then
- dependir = path.join(dependir, mode)
+ -- append plat sub-directory
+ local plat = config.get("plat")
+ if plat then
+ dependir = path.join(dependir, plat)
end
-- append arch sub-directory
@@ -555,6 +561,12 @@ function target:dependir()
if arch then
dependir = path.join(dependir, arch)
end
+
+ -- append mode sub-directory
+ local mode = config.get("mode")
+ if mode then
+ dependir = path.join(dependir, mode)
+ end
-- ok?
return dependir
@@ -575,10 +587,10 @@ function target:targetdir()
-- get build directory
targetdir = config.buildir()
- -- append mode sub-directory
- local mode = config.get("mode")
- if mode then
- targetdir = path.join(targetdir, mode)
+ -- append plat sub-directory
+ local plat = config.get("plat")
+ if plat then
+ targetdir = path.join(targetdir, plat)
end
-- append arch sub-directory
@@ -586,6 +598,12 @@ function target:targetdir()
if arch then
targetdir = path.join(targetdir, arch)
end
+
+ -- append mode sub-directory
+ local mode = config.get("mode")
+ if mode then
+ targetdir = path.join(targetdir, mode)
+ end
end
-- ok?