diff --git a/scripts/tundra/ide/msvc-common.lua b/scripts/tundra/ide/msvc-common.lua index 221c3b06..cb293bc3 100644 --- a/scripts/tundra/ide/msvc-common.lua +++ b/scripts/tundra/ide/msvc-common.lua @@ -516,9 +516,11 @@ function msvc_generator:generate_project(project, all_projects) p:write(' DefaultTargets="Build"') -- This doesn't seem to change any behaviour, but this is the default - -- value when creating a makefile project from VS2013, VS2015 and VS2017 - -- wizards. - if VERSION_YEAR == '2017' then + -- value when creating a makefile project from VS2013, VS2015, VS2017, + -- and VS2019 wizards. + if VERSION_YEAR == '2019' then + p:write(' ToolsVersion="16.0"') + elseif VERSION_YEAR == '2017' then p:write(' ToolsVersion="15.0"') elseif VERSION_YEAR == '2015' then p:write(' ToolsVersion="14.0"') @@ -542,11 +544,13 @@ function msvc_generator:generate_project(project, all_projects) p:write('\t', LF) p:write('\t', LF) - if VERSION_YEAR == '2017' then + if VERSION_YEAR == '2019' then + p:write('\t\t16.0', LF) + elseif VERSION_YEAR == '2017' then p:write('\t\t15.0', LF) end p:write('\t\t{', project.Guid, '}', LF) - if VERSION_YEAR == '2017' then + if VERSION_YEAR == '2019' or VERSION_YEAR == '2017' then p:write('\t\tWin32Proj', LF) else p:write('\t\tMakefileProj', LF) @@ -581,13 +585,15 @@ function msvc_generator:generate_project(project, all_projects) p:write('\t\tv140', LF) -- I have no idea what this setting affects elseif VERSION_YEAR == '2017' then p:write('\t\tv141', LF) -- I have no idea what this setting affects + elseif VERSION_YEAR == '2019' then + p:write('\t\tv142', LF) -- I have no idea what this setting affects end p:write('\t', LF) end p:write('\t', LF) - if VERSION_YEAR == '2017' then + if VERSION_YEAR == '2019' or VERSION_YEAR == '2017' then for _, tuple in ipairs(self.config_tuples) do p:write('\t', LF) p:write('\t\t', LF) diff --git a/scripts/tundra/ide/msvc142.lua b/scripts/tundra/ide/msvc142.lua new file mode 100644 index 00000000..7b239f1a --- /dev/null +++ b/scripts/tundra/ide/msvc142.lua @@ -0,0 +1,7 @@ +-- Microsoft Visual Studio 2019 Solution/Project file generation + +module(..., package.seeall) + +local msvc_common = require "tundra.ide.msvc-common" + +msvc_common.setup("12.00", "2019") diff --git a/scripts/tundra/tools/msvc-vs2019.lua b/scripts/tundra/tools/msvc-vs2019.lua new file mode 100644 index 00000000..2bb72581 --- /dev/null +++ b/scripts/tundra/tools/msvc-vs2019.lua @@ -0,0 +1,8 @@ + +module(..., package.seeall) + +local vscommon = require "tundra.tools.msvc-vscommon-next" + +function apply(env, options) + vscommon.apply_msvc_visual_studio("2019", env, options) +end