diff mbox series

[ovs-dev,v1,1/2] datapath-windows: Allow compiling all targets using SDK 10.0

Message ID 20180201025856.16216-1-rams@vmware.com
State Accepted
Delegated to: Alin Gabriel Serdean
Headers show
Series [ovs-dev,v1,1/2] datapath-windows: Allow compiling all targets using SDK 10.0 | expand

Commit Message

Shashank Ram Feb. 1, 2018, 2:58 a.m. UTC
Previously, Win8/8.1 targets would use SDK8.1. However, its
recommended to use the newer SDK as newer VS versions typically
drop support for older SDKs later on. This patch adds support
to compile all targets (Win8/8.1/10) using the 10.0 SDK.

Note that his patch does not drop support for older SDKs.

Signed-off-by: Shashank Ram <rams@vmware.com>
---
 datapath-windows/Package/package.VcxProj | 28 ++++++++++++------
 datapath-windows/ovsext/ovsext.vcxproj   | 50 +++++++++++++++++++-------------
 2 files changed, 49 insertions(+), 29 deletions(-)

Comments

Alin-Gabriel Serdean Feb. 6, 2018, 3:48 p.m. UTC | #1
Thanks a lot for the series.

Acked-by: Alin Gabriel Serdean <aserdean@ovn.org>

-----Mesaj original-----
De la: ovs-dev-bounces@openvswitch.org
[mailto:ovs-dev-bounces@openvswitch.org] În numele Shashank Ram
Trimis: Thursday, February 1, 2018 4:59 AM
Către: dev@openvswitch.org
Subiect: [ovs-dev] [PATCH v1 1/2] datapath-windows: Allow compiling all
targets using SDK 10.0

Previously, Win8/8.1 targets would use SDK8.1. However, its recommended to
use the newer SDK as newer VS versions typically drop support for older SDKs
later on. This patch adds support to compile all targets (Win8/8.1/10) using
the 10.0 SDK.

Note that his patch does not drop support for older SDKs.

Signed-off-by: Shashank Ram <rams@vmware.com>
---
 datapath-windows/Package/package.VcxProj | 28 ++++++++++++------
 datapath-windows/ovsext/ovsext.vcxproj   | 50
+++++++++++++++++++-------------
 2 files changed, 49 insertions(+), 29 deletions(-)
Alin-Gabriel Serdean Feb. 6, 2018, 4:32 p.m. UTC | #2
I applied the patch set on master. Thanks!

-----Mesaj original-----
De la: ovs-dev-bounces@openvswitch.org
[mailto:ovs-dev-bounces@openvswitch.org] În numele aserdean@ovn.org
Trimis: Tuesday, February 6, 2018 5:49 PM
Către: 'Shashank Ram' <rams@vmware.com>; dev@openvswitch.org
Subiect: Re: [ovs-dev] [PATCH v1 1/2] datapath-windows: Allow compiling all
targets using SDK 10.0

Thanks a lot for the series.

Acked-by: Alin Gabriel Serdean <aserdean@ovn.org>

-----Mesaj original-----
De la: ovs-dev-bounces@openvswitch.org
[mailto:ovs-dev-bounces@openvswitch.org] În numele Shashank Ram
Trimis: Thursday, February 1, 2018 4:59 AM
Către: dev@openvswitch.org
Subiect: [ovs-dev] [PATCH v1 1/2] datapath-windows: Allow compiling all
targets using SDK 10.0

Previously, Win8/8.1 targets would use SDK8.1. However, its recommended to
use the newer SDK as newer VS versions typically drop support for older SDKs
later on. This patch adds support to compile all targets (Win8/8.1/10) using
the 10.0 SDK.

Note that his patch does not drop support for older SDKs.

Signed-off-by: Shashank Ram <rams@vmware.com>
---
 datapath-windows/Package/package.VcxProj | 28 ++++++++++++------
 datapath-windows/ovsext/ovsext.vcxproj   | 50
+++++++++++++++++++-------------
 2 files changed, 49 insertions(+), 29 deletions(-)
diff mbox series

Patch

diff --git a/datapath-windows/Package/package.VcxProj b/datapath-windows/Package/package.VcxProj
index 47cadcd..de747ee 100644
--- a/datapath-windows/Package/package.VcxProj
+++ b/datapath-windows/Package/package.VcxProj
@@ -42,6 +42,8 @@ 
   </PropertyGroup>
   <PropertyGroup Label="Globals">
     <VCTargetsPath Condition="'$(VCTargetsPath11)' != '' and '$(VisualStudioVersion)' == '11.0'">$(VCTargetsPath11)</VCTargetsPath>
+    <PlatformToolsetVer Condition="$(WindowsSdkDir.EndsWith('\Windows Kits\10\'))">10.0</PlatformToolsetVer>
+    <PlatformToolsetVer Condition="$(WindowsSdkDir.EndsWith('\Windows Kits\8.1\'))">8.1</PlatformToolsetVer>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Label="Globals">
@@ -52,46 +54,54 @@ 
   <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">
     <TargetVersion>WindowsV6.3</TargetVersion>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">8.1</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'" Label="Configuration">
     <TargetVersion>WindowsV6.3</TargetVersion>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">8.1</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'" Label="Configuration">
     <TargetVersion>
     </TargetVersion>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">10.0</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
     <DriverTargetPlatform>Desktop</DriverTargetPlatform>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'" Label="Configuration">
     <TargetVersion>Windows8</TargetVersion>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">8.1</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'" Label="Configuration">
     <TargetVersion>Windows8</TargetVersion>
     <UseDebugLibraries>true</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">8.1</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'" Label="Configuration">
     <TargetVersion>
     </TargetVersion>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">10.0</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
     <DriverTargetPlatform>Universal</DriverTargetPlatform>
   </PropertyGroup>
   <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">
     <TargetVersion>WindowsV6.3</TargetVersion>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">8.1</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'" Label="Configuration">
     <TargetVersion>Windows8</TargetVersion>
     <UseDebugLibraries>false</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">8.1</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <ImportGroup Label="ExtensionSettings">
@@ -175,4 +185,4 @@ 
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">
   </ImportGroup>
-</Project>
\ No newline at end of file
+</Project>
diff --git a/datapath-windows/ovsext/ovsext.vcxproj b/datapath-windows/ovsext/ovsext.vcxproj
index 48055b9..0509b76 100644
--- a/datapath-windows/ovsext/ovsext.vcxproj
+++ b/datapath-windows/ovsext/ovsext.vcxproj
@@ -43,6 +43,8 @@ 
     <Configuration>Win8 Debug</Configuration>
     <Platform Condition="'$(Platform)' == ''">Win32</Platform>
     <SampleGuid>{0D37F250-E766-44C7-90B4-D7E07E77D1AA}</SampleGuid>
+    <PlatformToolsetVer Condition="$(WindowsSdkDir.EndsWith('\Windows Kits\10\'))">10.0</PlatformToolsetVer>
+    <PlatformToolsetVer Condition="$(WindowsSdkDir.EndsWith('\Windows Kits\8.1\'))">8.1</PlatformToolsetVer>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
   <PropertyGroup Label="Globals">
@@ -52,46 +54,54 @@ 
   <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">
     <TargetVersion>WindowsV6.3</TargetVersion>
     <UseDebugLibraries>True</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">8.1</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'" Label="Configuration">
     <TargetVersion>WindowsV6.3</TargetVersion>
     <UseDebugLibraries>True</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">8.1</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'" Label="Configuration">
     <TargetVersion>
     </TargetVersion>
     <UseDebugLibraries>True</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">10.0</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
     <DriverTargetPlatform>Desktop</DriverTargetPlatform>
   </PropertyGroup>
   <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">
-    <TargetVersion>Win8</TargetVersion>
+    <TargetVersion>Windows8</TargetVersion>
     <UseDebugLibraries>True</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">8.1</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'" Label="Configuration">
-    <TargetVersion>Win8</TargetVersion>
+    <TargetVersion>Windows8</TargetVersion>
     <UseDebugLibraries>True</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">8.1</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">
     <TargetVersion>WindowsV6.3</TargetVersion>
     <UseDebugLibraries>False</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">8.1</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
   </PropertyGroup>
   <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'" Label="Configuration">
     <TargetVersion>
     </TargetVersion>
     <UseDebugLibraries>False</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver10.0</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">10.0</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
     <DriverTargetPlatform>Desktop</DriverTargetPlatform>
   </PropertyGroup>
   <PropertyGroup Label="Configuration" Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
-    <TargetVersion>Win8</TargetVersion>
+    <TargetVersion>Windows8</TargetVersion>
     <UseDebugLibraries>False</UseDebugLibraries>
-    <PlatformToolset>WindowsKernelModeDriver8.1</PlatformToolset>
+    <PlatformToolsetVer Condition="'$(PlatformToolsetVer)' == ''">8.1</PlatformToolsetVer>
+    <PlatformToolset>WindowsKernelModeDriver$(PlatformToolsetVer)</PlatformToolset>
   </PropertyGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
   <PropertyGroup>
@@ -144,7 +154,7 @@ 
     <ClInclude Include="Netlink/Netlink.h" />
     <ClInclude Include="Netlink/NetlinkBuf.h" />
     <ClInclude Include="Netlink/NetlinkProto.h" />
-    <ClInclude Include="Netlink\NetlinkError.h" />
+    <ClInclude Include="Netlink/NetlinkError.h" />
     <ClInclude Include="NetProto.h" />
     <ClInclude Include="Offload.h" />
     <ClInclude Include="Oid.h" />
@@ -275,14 +285,14 @@ 
       <WarningLevel>Level4</WarningLevel>
       <ExceptionHandling>
       </ExceptionHandling>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'">$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
-      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Debug|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1Analyze|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10 Debug|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win8.1 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories Condition="'$(Configuration)|$(Platform)'=='Win10 Release|x64'">.;$(IntDir);%(AdditionalIncludeDirectories);..\..;$(MSBuildProjectDirectory)</AdditionalIncludeDirectories>
       <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">true</MultiProcessorCompilation>
       <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">true</MultiProcessorCompilation>
       <MultiProcessorCompilation Condition="'$(Configuration)|$(Platform)'=='Win8Analyze|x64'">true</MultiProcessorCompilation>