Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit20e99cd

Browse files
committed
Honor MSVC WindowsSDKVersion if set
Add a line to the project file setting the target SDK. Otherwise, in forexample VS2017, if the default but optional 8.1 SDK is not installed thebuild will fail.Patch from Peifeng Qiu, slightly edited by me.Discussion:https://postgr.es/m/CABmtVJhw1boP_bd4=b3Qv5YnqEdL696NtHFi2ruiyQ6mFHkeQQ@mail.gmail.comBackpatch to all live branches.
1 parentf5a4ab2 commit20e99cd

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

‎src/tools/msvc/MSBuildProject.pm

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ EOF
4040
</ItemGroup>
4141
<PropertyGroup Label="Globals">
4242
<ProjectGuid>$self->{guid}</ProjectGuid>
43+
EOF
44+
# Check whether WindowsSDKVersion env variable is present.
45+
# Add WindowsTargetPlatformVersion node if so.
46+
my$sdkVersion =$ENV{'WindowsSDKVersion'};
47+
if (defined($sdkVersion))
48+
{
49+
# remove trailing backslash if necessary.
50+
$sdkVersion, =~s/\\$//;
51+
print$f<<EOF
52+
<WindowsTargetPlatformVersion>$sdkVersion</WindowsTargetPlatformVersion>
53+
EOF
54+
}
55+
print$f<<EOF;
4356
</PropertyGroup>
4457
<Import Project="\$(VCTargetsPath)\\Microsoft.Cpp.Default.props" />
4558
EOF

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp