summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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?