diff options
| author | ruki <[email protected]> | 2019-06-06 00:34:00 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2019-06-05 21:24:01 +0800 |
| commit | 783dce4adabedce2062a90f3231e2b2f7e4942e2 (patch) | |
| tree | 0471a45b0173a9a6f697c4cc5906a38708fcff39 /xmake/core/project/target.lua | |
| parent | 06dba0daf4968b9632ebc00a9018c6af044422df (diff) | |
add target.set_rundir api
Diffstat (limited to 'xmake/core/project/target.lua')
| -rw-r--r-- | xmake/core/project/target.lua | 6 |
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" |
