summaryrefslogtreecommitdiff
path: root/xmake/plugins
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-08-21 13:29:47 +0800
committerOpportunityLiu <[email protected]>2019-08-21 13:29:47 +0800
commitdb2cb167b30b6b69af1ba2d4ea35e2fa4e56eca8 (patch)
tree0983e49187fe4718d24eac916fe71926bd1b15fb /xmake/plugins
parent734b4f3190501de2368241ed95940a6899e7ce0b (diff)
make project more portable
Diffstat (limited to 'xmake/plugins')
-rw-r--r--xmake/plugins/project/vsxmake/getinfo.lua11
1 files changed, 10 insertions, 1 deletions
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