@@ -516,9 +516,11 @@ function msvc_generator:generate_project(project, all_projects)
516
516
p :write (' DefaultTargets="Build"' )
517
517
518
518
-- 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
522
524
p :write (' ToolsVersion="15.0"' )
523
525
elseif VERSION_YEAR == ' 2015' then
524
526
p :write (' ToolsVersion="14.0"' )
@@ -542,11 +544,13 @@ function msvc_generator:generate_project(project, all_projects)
542
544
p :write (' \t </ItemGroup>' , LF )
543
545
544
546
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
546
550
p :write (' \t\t <VCProjectVersion>15.0</VCProjectVersion>' , LF )
547
551
end
548
552
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
550
554
p :write (' \t\t <Keyword>Win32Proj</Keyword>' , LF )
551
555
else
552
556
p :write (' \t\t <Keyword>MakefileProj</Keyword>' , LF )
@@ -581,13 +585,15 @@ function msvc_generator:generate_project(project, all_projects)
581
585
p :write (' \t\t <PlatformToolset>v140</PlatformToolset>' , LF ) -- I have no idea what this setting affects
582
586
elseif VERSION_YEAR == ' 2017' then
583
587
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
584
590
end
585
591
p :write (' \t </PropertyGroup>' , LF )
586
592
end
587
593
588
594
p :write (' \t <Import Project="$(VCTargetsPath)\M icrosoft.Cpp.props" />' , LF )
589
595
590
- if VERSION_YEAR == ' 2017' then
596
+ if VERSION_YEAR == ' 2019 ' or VERSION_YEAR == ' 2017' then
591
597
for _ , tuple in ipairs (self .config_tuples ) do
592
598
p :write (' \t <ImportGroup Label="PropertySheets" Condition="\' $(Configuration)|$(Platform)\' ==\' ' , tuple .MsvcName , ' \' ">' , LF )
593
599
p :write (' \t\t <Import Project="$(UserRootDir)\M icrosoft.Cpp.$(Platform).user.props" Condition="exists(\' $(UserRootDir)\M icrosoft.Cpp.$(Platform).user.props\' )" Label="LocalAppDataPlatform" />' , LF )
0 commit comments