summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/cmake.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2025-09-10 23:45:37 +0800
committerruki <[email protected]>2025-09-10 23:45:37 +0800
commit47d5aff2085590620041c00091484e4edda9f9f3 (patch)
treee8090de390b770f1f5ce3ec4c47d383473b89d4e /xmake/modules/package/tools/cmake.lua
parent3844210dfaee545890a72e190d8c3585c512c2d8 (diff)
improve vs version
Diffstat (limited to 'xmake/modules/package/tools/cmake.lua')
-rw-r--r--xmake/modules/package/tools/cmake.lua13
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