From db2cb167b30b6b69af1ba2d4ea35e2fa4e56eca8 Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Wed, 21 Aug 2019 13:29:47 +0800 Subject: make project more portable --- xmake/plugins/project/vsxmake/getinfo.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua index f433cb157..8cfe46591 100644 --- a/xmake/plugins/project/vsxmake/getinfo.lua +++ b/xmake/plugins/project/vsxmake/getinfo.lua @@ -186,7 +186,16 @@ function _make_targetinfo(mode, arch, target) end end for k, v in pairs(setrunenvs) do - runenvs[k] = path.joinenv(v) + if #v == 1 then + v = v[1] + if path.is_absolute(v) and v:startswith(project.directory()) then + runenvs[k] = _make_dirs(v) + else + runenvs[k] = v[1] + end + else + runenvs[k] = path.joinenv(v) + end end local runenvstr = {} for k, v in pairs(runenvs) do -- cgit v1.3.1