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

Commit165f4ee

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 parent5c3d472 commit165f4ee

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
@@ -38,6 +38,19 @@ EOF
3838
</ItemGroup>
3939
<PropertyGroup Label="Globals">
4040
<ProjectGuid>$self->{guid}</ProjectGuid>
41+
EOF
42+
# Check whether WindowsSDKVersion env variable is present.
43+
# Add WindowsTargetPlatformVersion node if so.
44+
my$sdkVersion =$ENV{'WindowsSDKVersion'};
45+
if (defined($sdkVersion))
46+
{
47+
# remove trailing backslash if necessary.
48+
$sdkVersion, =~s/\\$//;
49+
print$f<<EOF
50+
<WindowsTargetPlatformVersion>$sdkVersion</WindowsTargetPlatformVersion>
51+
EOF
52+
}
53+
print$f<<EOF;
4154
</PropertyGroup>
4255
<Import Project="\$(VCTargetsPath)\\Microsoft.Cpp.Default.props" />
4356
EOF

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp