Skip to content

Commit 6d9f0a5

Browse files
authoredOct 24, 2019
Merge pull request #324 from bmharper/master
Add support for VS 2019
2 parents 5ae273e + 8de456b commit 6d9f0a5

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed
 

‎scripts/tundra/ide/msvc-common.lua

+12-6
Original file line numberDiff line numberDiff line change
@@ -516,9 +516,11 @@ function msvc_generator:generate_project(project, all_projects)
516516
p:write(' DefaultTargets="Build"')
517517

518518
-- This doesn't seem to change any behaviour, but this is the default
519-
-- value when creating a makefile project from VS2013, VS2015 and VS2017
520-
-- wizards.
521-
if VERSION_YEAR == '2017' then
519+
-- value when creating a makefile project from VS2013, VS2015, VS2017,
520+
-- and VS2019 wizards.
521+
if VERSION_YEAR == '2019' then
522+
p:write(' ToolsVersion="16.0"')
523+
elseif VERSION_YEAR == '2017' then
522524
p:write(' ToolsVersion="15.0"')
523525
elseif VERSION_YEAR == '2015' then
524526
p:write(' ToolsVersion="14.0"')
@@ -542,11 +544,13 @@ function msvc_generator:generate_project(project, all_projects)
542544
p:write('\t</ItemGroup>', LF)
543545

544546
p:write('\t<PropertyGroup Label="Globals">', LF)
545-
if VERSION_YEAR == '2017' then
547+
if VERSION_YEAR == '2019' then
548+
p:write('\t\t<VCProjectVersion>16.0</VCProjectVersion>', LF)
549+
elseif VERSION_YEAR == '2017' then
546550
p:write('\t\t<VCProjectVersion>15.0</VCProjectVersion>', LF)
547551
end
548552
p:write('\t\t<ProjectGuid>{', project.Guid, '}</ProjectGuid>', LF)
549-
if VERSION_YEAR == '2017' then
553+
if VERSION_YEAR == '2019' or VERSION_YEAR == '2017' then
550554
p:write('\t\t<Keyword>Win32Proj</Keyword>', LF)
551555
else
552556
p:write('\t\t<Keyword>MakefileProj</Keyword>', LF)
@@ -581,13 +585,15 @@ function msvc_generator:generate_project(project, all_projects)
581585
p:write('\t\t<PlatformToolset>v140</PlatformToolset>', LF) -- I have no idea what this setting affects
582586
elseif VERSION_YEAR == '2017' then
583587
p:write('\t\t<PlatformToolset>v141</PlatformToolset>', LF) -- I have no idea what this setting affects
588+
elseif VERSION_YEAR == '2019' then
589+
p:write('\t\t<PlatformToolset>v142</PlatformToolset>', LF) -- I have no idea what this setting affects
584590
end
585591
p:write('\t</PropertyGroup>', LF)
586592
end
587593

588594
p:write('\t<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />', LF)
589595

590-
if VERSION_YEAR == '2017' then
596+
if VERSION_YEAR == '2019' or VERSION_YEAR == '2017' then
591597
for _, tuple in ipairs(self.config_tuples) do
592598
p:write('\t<ImportGroup Label="PropertySheets" Condition="\'$(Configuration)|$(Platform)\'==\'', tuple.MsvcName, '\'">', LF)
593599
p:write('\t\t<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists(\'$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props\')" Label="LocalAppDataPlatform" />', LF)

‎scripts/tundra/ide/msvc142.lua

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
-- Microsoft Visual Studio 2019 Solution/Project file generation
2+
3+
module(..., package.seeall)
4+
5+
local msvc_common = require "tundra.ide.msvc-common"
6+
7+
msvc_common.setup("12.00", "2019")

‎scripts/tundra/tools/msvc-vs2019.lua

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
2+
module(..., package.seeall)
3+
4+
local vscommon = require "tundra.tools.msvc-vscommon-next"
5+
6+
function apply(env, options)
7+
vscommon.apply_msvc_visual_studio("2019", env, options)
8+
end

0 commit comments

Comments
 (0)
Please sign in to comment.