summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2021-07-06 22:19:46 +0800
committerruki <[email protected]>2021-07-06 07:59:20 +0800
commit22d281aba6f47a4c56c12b3e0219fdd33f8e4f26 (patch)
tree87d37dbc1cb7b8549c9673ed540e7e0d1d2df374
parent5e216156e47dee9d821fea01c01e566371a556be (diff)
improve vs2022 for project generator
-rw-r--r--xmake/plugins/project/main.lua2
-rw-r--r--xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua1
-rw-r--r--xmake/plugins/project/vstudio/impl/vsinfo.lua10
-rw-r--r--xmake/plugins/project/xmake.lua5
4 files changed, 14 insertions, 4 deletions
diff --git a/xmake/plugins/project/main.lua b/xmake/plugins/project/main.lua
index 63c316f1f..90cdc0695 100644
--- a/xmake/plugins/project/main.lua
+++ b/xmake/plugins/project/main.lua
@@ -54,6 +54,7 @@ function makers()
, vs2015 = vs.make(2015)
, vs2017 = vs.make(2017)
, vs2019 = vs.make(2019)
+ , vs2022 = vs.make(2022)
, vs = vs.make()
, vsxmake2010 = vsxmake.make(2010)
, vsxmake2012 = vsxmake.make(2012)
@@ -61,6 +62,7 @@ function makers()
, vsxmake2015 = vsxmake.make(2015)
, vsxmake2017 = vsxmake.make(2017)
, vsxmake2019 = vsxmake.make(2019)
+ , vsxmake2022 = vsxmake.make(2022)
, vsxmake = vsxmake.make()
, compile_flags = compile_flags.make
, compile_commands = compile_commands.make
diff --git a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua
index d916dcd51..90253940b 100644
--- a/xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua
+++ b/xmake/plugins/project/vstudio/impl/vs201x_vcxproj_filters.lua
@@ -38,6 +38,7 @@ function _make_header(filtersfile, vsinfo)
, vs2015 = '14.0'
, vs2017 = '15.0'
, vs2019 = '16.0'
+ , vs2022 = '17.0'
}
-- make header
diff --git a/xmake/plugins/project/vstudio/impl/vsinfo.lua b/xmake/plugins/project/vstudio/impl/vsinfo.lua
index 754153cc6..cccf3db8d 100644
--- a/xmake/plugins/project/vstudio/impl/vsinfo.lua
+++ b/xmake/plugins/project/vstudio/impl/vsinfo.lua
@@ -85,9 +85,17 @@ local vsinfo =
, toolset_version = "v142"
, sdk_version = "10.0.17763.0"
}
+, [2022] =
+ { vstudio_version = "2022"
+ , project_version = "17"
+ , filters_version = "4.0"
+ , solution_version = "12"
+ , toolset_version = "v142"
+ , sdk_version = "10.0.17763.0" -- TODO
+ }
}
function main(version)
assert(version)
return assert(vsinfo[version], "unsupported vs version (%d)", version);
-end \ No newline at end of file
+end
diff --git a/xmake/plugins/project/xmake.lua b/xmake/plugins/project/xmake.lua
index 659d35553..794cd62af 100644
--- a/xmake/plugins/project/xmake.lua
+++ b/xmake/plugins/project/xmake.lua
@@ -46,9 +46,8 @@ task("project")
, " - xcode (need cmake)"
, " - compile_flags"
, " - compile_commands (clang compilation database with json format)"
- , " - vs (auto detect), vs2002, vs2003, vs2005, vs2008"
- , " - vs2010, vs2012, vs2013, vs2015, vs2017, vs2019"
- , " - vsxmake (auto detect), vsxmake2010 ~ vsxmake2019"
+ , " - vs (auto detect), vs2002 - vs2022"
+ , " - vsxmake (auto detect), vsxmake2010 ~ vsxmake2022"
, values = function (complete, opt)
if not complete then return end