summaryrefslogtreecommitdiff
path: root/xmake/plugins/project
diff options
context:
space:
mode:
authorOpportunityLiu <[email protected]>2019-07-17 15:01:53 +0800
committerOpportunityLiu <[email protected]>2019-07-19 11:48:32 +0800
commite98bcd58485a636dc897946f652be9067d37a9e0 (patch)
tree3c276a1548c2250a3672398a2a4ec4170e8e0993 /xmake/plugins/project
parent9b8aef08039cbd82503d62f13e13096e166104e4 (diff)
replace old sep
Diffstat (limited to 'xmake/plugins/project')
-rw-r--r--xmake/plugins/project/vstudio/impl/vs201x.lua6
-rw-r--r--xmake/plugins/project/vsxmake/getinfo.lua6
-rw-r--r--xmake/plugins/project/vsxmake/vsxmake.lua2
3 files changed, 13 insertions, 1 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs201x.lua b/xmake/plugins/project/vstudio/impl/vs201x.lua
index 3ea83fac2..af0a18d0c 100644
--- a/xmake/plugins/project/vstudio/impl/vs201x.lua
+++ b/xmake/plugins/project/vstudio/impl/vs201x.lua
@@ -165,6 +165,9 @@ function _make_vsinfo_modes()
local vsinfo_modes = {}
local modes = option.get("modes")
if modes then
+ if not modes:find("\"") then
+ modes = modes:gsub(",", path.envsep())
+ end
for _, mode in ipairs(path.splitenv(modes)) do
table.insert(vsinfo_modes, mode:trim())
end
@@ -181,6 +184,9 @@ function _make_vsinfo_archs()
local vsinfo_archs = {}
local archs = option.get("archs")
if archs then
+ if not archs:find("\"") then
+ archs = archs:gsub(",", path.envsep())
+ end
for _, arch in ipairs(path.splitenv(archs)) do
table.insert(vsinfo_archs, arch:trim())
end
diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua
index 97e1e4961..ceb955b46 100644
--- a/xmake/plugins/project/vsxmake/getinfo.lua
+++ b/xmake/plugins/project/vsxmake/getinfo.lua
@@ -129,6 +129,9 @@ function _make_vsinfo_modes()
local vsinfo_modes = {}
local modes = option.get("modes")
if modes then
+ if not modes:find("\"") then
+ modes = modes:gsub(",", path.envsep())
+ end
for _, mode in ipairs(path.splitenv(modes)) do
table.insert(vsinfo_modes, mode:trim())
end
@@ -145,6 +148,9 @@ function _make_vsinfo_archs()
local vsinfo_archs = {}
local archs = option.get("archs")
if archs then
+ if not archs:find("\"") then
+ archs = archs:gsub(",", path.envsep())
+ end
for _, arch in ipairs(path.splitenv(archs)) do
table.insert(vsinfo_archs, arch:trim())
end
diff --git a/xmake/plugins/project/vsxmake/vsxmake.lua b/xmake/plugins/project/vsxmake/vsxmake.lua
index 348138ed7..a3235f060 100644
--- a/xmake/plugins/project/vsxmake/vsxmake.lua
+++ b/xmake/plugins/project/vsxmake/vsxmake.lua
@@ -67,7 +67,7 @@ function _escape(str)
str = str:sub(#("$(XmakeProjectDir)") + 1)
end
- str = (string.gsub(str, "[%%%$@'\";%?%*]", function (c) return assert(map[c]) end))
+ str = (string.gsub(str, "[%%%$@';%?%*]", function (c) return assert(map[c]) end))
if has_prefix then
str = "$(XmakeProjectDir)" .. str
end