diff --git a/xmake/plugins/project/vstudio/impl/vs201x.lua b/xmake/plugins/project/vstudio/impl/vs201x.lua index 3ea83fac269..af0a18d0ce2 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 97e1e4961a9..ceb955b460f 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 348138ed739..a3235f06086 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