From 783dce4adabedce2062a90f3231e2b2f7e4942e2 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 6 Jun 2019 00:34:00 +0800 Subject: add target.set_rundir api --- xmake/actions/run/main.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xmake/actions/run/main.lua') diff --git a/xmake/actions/run/main.lua b/xmake/actions/run/main.lua index ae5bf997e..aab49ad50 100644 --- a/xmake/actions/run/main.lua +++ b/xmake/actions/run/main.lua @@ -32,14 +32,14 @@ import("devel.debugger") function _do_run_target(target) if target:targetkind() == "binary" then - -- get the work directory of target - local workdir = option.get("workdir") or path.directory(target:targetfile()) + -- get the run directory of target + local rundir = target:rundir() -- get the absolute target file path local targetfile = path.absolute(target:targetfile()) - -- enter the work directory - local oldir = os.cd(workdir) + -- enter the run directory + local oldir = os.cd(rundir) -- add search directories for all dependent shared libraries on windows if is_plat("windows") or (is_plat("mingw") and is_host("windows")) then -- cgit v1.3.1