diff options
| author | ruki <[email protected]> | 2023-06-22 23:33:29 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-06-22 23:33:29 +0800 |
| commit | 1bda9dce9f0acb17a1357dea95263587a01863ff (patch) | |
| tree | 8cbec58a60a75c5455770aa00cd35b3d485b6e80 | |
| parent | d94de0431e41498ac7db3dc485ff50bbf2320497 (diff) | |
| parent | 1a9b893647afafd644bd69eef27e94deb05b635f (diff) | |
Merge pull request #3877 from heheda123123/patch-5
add upgrade to msbuild.lua
| -rw-r--r-- | xmake/modules/package/tools/msbuild.lua | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/xmake/modules/package/tools/msbuild.lua b/xmake/modules/package/tools/msbuild.lua index 0a2966855..21fd2e693 100644 --- a/xmake/modules/package/tools/msbuild.lua +++ b/xmake/modules/package/tools/msbuild.lua @@ -77,15 +77,11 @@ function build(package, configs, opt) opt = opt or {} -- pass configurations - local slnfile local argv = {} for name, value in pairs(_get_configs(package, configs, opt)) do value = tostring(value):trim() if value ~= "" then if type(name) == "number" then - if value:endswith(".sln") then - slnfile = value - end table.insert(argv, value) else table.insert(argv, name .. "=" .. value) @@ -95,8 +91,11 @@ function build(package, configs, opt) -- upgrade vs solution file? -- @see https://github.com/xmake-io/xmake/issues/3871 - if slnfile and opt.upgrade then - upgrade_vsproj.upgrade(slnfile, table.join(opt, {msvc = _get_msvc(package)})) + if opt.upgrade then + local msvc = _get_msvc(package) + for _, value in ipairs(opt.upgrade) do + upgrade_vsproj.upgrade(value, table.join(opt, {msvc = msvc})) + end end -- do build |
