Skip to content

Commit

Permalink
Update project files for build with higher WDK installed
Browse files Browse the repository at this point in the history
When higher WDK than 14393 is installed on the machine, the modified
files related to build of drivers and driver-related applications may
produce errors on build using VS2015. Fixed project files solve this.

Signed-off-by: Yuri Benditovich <[email protected]>
  • Loading branch information
ybendito authored and YanVugenfirer committed Jan 27, 2019
1 parent 4d1ecea commit 4473e41
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 0 deletions.
31 changes: 31 additions & 0 deletions Tools/Driver.Initial.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
<!--
***********************************************************************************************
Driver.Initial.props
Should be imported just after Microsoft.Cpp.Default.props
and after target Windows versions defined for configurations
Common property definitions used by all drivers:
***********************************************************************************************
-->

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" TreatAsLocalProperty="Platform">

<Target Name="IntermediateNotify" BeforeTargets="PrepareForBuild" AfterTargets="DriverBuildNotifications">
<!-- Indicate to users what they are building -->
<Message Importance="high" Text="Driver.Initial.props: TargetVersion=$(TargetVersion) _NT_TARGET_VERSION=$(_NT_TARGET_VERSION) SUBSYSTEM_NATVER=$(SUBSYSTEM_NATVER) mismatch=$(MidlTargetMismatch)" />
</Target>

<PropertyGroup Condition="'$(TargetVersion)'=='Windows10'">
<_NT_TARGET_VERSION>0x0A00</_NT_TARGET_VERSION>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetVersion)'=='WindowsV6.3'">
<_NT_TARGET_VERSION>0x0603</_NT_TARGET_VERSION>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetVersion)'=='Windows8'">
<_NT_TARGET_VERSION>0x0602</_NT_TARGET_VERSION>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetVersion)'=='Windows7'">
<_NT_TARGET_VERSION>0x0601</_NT_TARGET_VERSION>
</PropertyGroup>

</Project>
1 change: 1 addition & 0 deletions UsbDk Package/UsbDk Package.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,7 @@
<DriverType>Package</DriverType>
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
</PropertyGroup>
<Import Project="..\Tools\Driver.Initial.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
Expand Down
1 change: 1 addition & 0 deletions UsbDk/UsbDk.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -1178,6 +1178,7 @@
<KMDF_VERSION_MAJOR>1</KMDF_VERSION_MAJOR>
<KMDF_VERSION_MINOR>11</KMDF_VERSION_MINOR>
</PropertyGroup>
<Import Project="..\Tools\Driver.Initial.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
Expand Down
2 changes: 2 additions & 0 deletions UsbDkController/UsbDkController.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
<Keyword>Win32Proj</Keyword>
<RootNamespace>UsbDkController</RootNamespace>
<WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
<TargetVersion>Windows7</TargetVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -322,6 +323,7 @@
<CharacterSet>Unicode</CharacterSet>
<DriverTargetPlatform>Desktop</DriverTargetPlatform>
</PropertyGroup>
<Import Project="..\Tools\Driver.Initial.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
Expand Down
2 changes: 2 additions & 0 deletions UsbDkHelper/UsbDkHelper.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
<Keyword>Win32Proj</Keyword>
<RootNamespace>UsbDkHelper</RootNamespace>
<WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
<TargetVersion>Windows7</TargetVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -322,6 +323,7 @@
<CharacterSet>Unicode</CharacterSet>
<DriverTargetPlatform>Desktop</DriverTargetPlatform>
</PropertyGroup>
<Import Project="..\Tools\Driver.Initial.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
Expand Down
2 changes: 2 additions & 0 deletions UsbDkInstHelper/UsbDkInstHelper.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
<Keyword>Win32Proj</Keyword>
<RootNamespace>UsbDkController</RootNamespace>
<WindowsTargetPlatformVersion>$(LatestTargetPlatformVersion)</WindowsTargetPlatformVersion>
<TargetVersion>Windows7</TargetVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'" Label="Configuration">
Expand Down Expand Up @@ -322,6 +323,7 @@
<CharacterSet>Unicode</CharacterSet>
<DriverTargetPlatform>Desktop</DriverTargetPlatform>
</PropertyGroup>
<Import Project="..\Tools\Driver.Initial.props" />
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
Expand Down

0 comments on commit 4473e41

Please sign in to comment.