summaryrefslogtreecommitdiff
path: root/xmake/core/project/target.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/core/project/target.lua')
-rw-r--r--xmake/core/project/target.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/core/project/target.lua b/xmake/core/project/target.lua
index f4809f424..b2a77644d 100644
--- a/xmake/core/project/target.lua
+++ b/xmake/core/project/target.lua
@@ -736,6 +736,11 @@ function _instance:configdir()
return self:get("configdir") or config.buildir()
end
+-- get run directory
+function _instance:rundir()
+ return baseoption.get("workdir") or self:get("rundir") or path.directory(self:targetfile())
+end
+
-- get install directory
function _instance:installdir()
@@ -1552,6 +1557,7 @@ function target.apis()
, "target.set_dependir"
, "target.set_configdir"
, "target.set_installdir"
+ , "target.set_rundir"
-- target.add_xxx
, "target.add_files"
, "target.add_configfiles"