diff options
| author | ruki <[email protected]> | 2025-09-10 23:45:37 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2025-09-10 23:45:37 +0800 |
| commit | 47d5aff2085590620041c00091484e4edda9f9f3 (patch) | |
| tree | e8090de390b770f1f5ce3ec4c47d383473b89d4e /xmake/modules/package/tools/cmake.lua | |
| parent | 3844210dfaee545890a72e190d8c3585c512c2d8 (diff) | |
improve vs version
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index 21eed5392..cbf9bcb37 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -764,20 +764,9 @@ end -- get cmake generator for msvc function _get_cmake_generator_for_msvc(package) - local vsvers = - { - ["2022"] = "17", - ["2019"] = "16", - ["2017"] = "15", - ["2015"] = "14", - ["2013"] = "12", - ["2012"] = "11", - ["2010"] = "10", - ["2008"] = "9" - } local vs = _get_msvc(package):config("vs") or config.get("vs") assert(vsvers[vs], "Unknown Visual Studio version: '" .. tostring(vs) .. "' set in project.") - return "Visual Studio " .. vsvers[vs] .. " " .. vs + return "Visual Studio " .. toolchain_utils.get_vsver(vs) .. " " .. vs end -- get configs for cmake generator |
