Skip to content

Commit

Permalink
Add a cxplat.props file and match xdp artifacts folder structure (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
csujedihy authored Jul 18, 2024
1 parent 0e59424 commit 1cd64d3
Show file tree
Hide file tree
Showing 4 changed files with 51 additions and 95 deletions.
42 changes: 42 additions & 0 deletions src/cxplat.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup>
<!-- Configuration properties to match Windows. These are used when built as a dependency. -->
<WinConfig Condition="'$(Configuration)' == 'Release'">fre</WinConfig>
<WinConfig Condition="'$(Configuration)' == 'Debug'">chk</WinConfig>
<WinPlat Condition="'$(Platform)' == 'Win32'">x86</WinPlat>
<WinPlat Condition="'$(Platform)' == 'x64'">amd64</WinPlat>
<WinPlat Condition="'$(Platform)' == 'ARM64'">arm64</WinPlat>
<WinPlat Condition="'$(Platform)' == 'ARM64EC'">arm64ec</WinPlat>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup Condition="'$(ONEBRANCH_BUILD)' != ''">
<ApiValidator_Enable>false</ApiValidator_Enable>
</PropertyGroup>
</Project>
36 changes: 4 additions & 32 deletions src/lib/cxplat.kernel.vcxproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<Import Project="..\cxplat.props" />
<ItemGroup>
<ClCompile Include="cxplat_winkernel.c" />
</ItemGroup>
Expand All @@ -41,12 +24,6 @@
<ConfigurationType>StaticLibrary</ConfigurationType>
<_NT_TARGET_VERSION>0x0A00000A</_NT_TARGET_VERSION>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets">
Expand All @@ -58,21 +35,16 @@
<CXPLAT_VER_SUFFIX Condition="'$(CXPLAT_VER_SUFFIX)' == ''">-private</CXPLAT_VER_SUFFIX>
<CXPLAT_VER_GIT_HASH Condition="'$(CXPLAT_VER_GIT_HASH)' == ''">0</CXPLAT_VER_GIT_HASH>
</PropertyGroup>
<PropertyGroup>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<TargetName>cxplat</TargetName>
<IntDir>$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)\obj\$(ProjectName)\</IntDir>
<OutDir>$(SolutionDir)artifacts\bin\winkernel\$(Platform)_$(Configuration)\</OutDir>
<OutDir Condition="'$(SolutionName)' == 'cxplat.kernel'">$(SolutionDir)artifacts\bin\winkernel\$(Platform)_$(Configuration)\</OutDir>
<!-- Output path when built as a dependency -->
<OutDir Condition="'$(SolutionName)' != 'cxplat.kernel'">$(SolutionDir)artifacts\bin\$(WinPlat)$(WinConfig)\cxplat\winkernel\</OutDir>
</PropertyGroup>
<PropertyGroup>
<ExternalIncludePath />
</PropertyGroup>
<PropertyGroup Condition="'$(ONEBRANCH_BUILD)' != ''">
<ApiValidator_Enable>false</ApiValidator_Enable>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)submodules\cxplat\inc;$(SolutionDir)submodules\cxplat\src\inc;$(SolutionDir)inc;$(SolutionDir)\src\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
Expand Down
36 changes: 4 additions & 32 deletions src/lib/cxplat.user.vcxproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<Import Project="..\cxplat.props" />
<ItemGroup>
<ClCompile Include="cxplat_winuser.c" />
</ItemGroup>
Expand All @@ -38,12 +21,6 @@
<PlatformToolset>WindowsApplicationForDrivers10.0</PlatformToolset>
<ConfigurationType>StaticLibrary</ConfigurationType>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets">
Expand All @@ -55,21 +32,16 @@
<CXPLAT_VER_SUFFIX Condition="'$(CXPLAT_VER_SUFFIX)' == ''">-private</CXPLAT_VER_SUFFIX>
<CXPLAT_VER_GIT_HASH Condition="'$(CXPLAT_VER_GIT_HASH)' == ''">0</CXPLAT_VER_GIT_HASH>
</PropertyGroup>
<PropertyGroup>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
</PropertyGroup>
<PropertyGroup>
<TargetName>cxplat</TargetName>
<IntDir>$(SolutionDir)build\winuser\$(Platform)_$(Configuration)\obj\$(ProjectName)\</IntDir>
<OutDir>$(SolutionDir)artifacts\bin\winuser\$(Platform)_$(Configuration)\</OutDir>
<OutDir Condition="'$(SolutionName)' == 'cxplat.winuser'">$(SolutionDir)artifacts\bin\winuser\$(Platform)_$(Configuration)\</OutDir>
<!-- Output path when built as a dependency -->
<OutDir Condition="'$(SolutionName)' != 'cxplat.winuser'">$(SolutionDir)artifacts\bin\$(WinPlat)$(WinConfig)\cxplat\winuser\</OutDir>
</PropertyGroup>
<PropertyGroup>
<ExternalIncludePath />
</PropertyGroup>
<PropertyGroup Condition="'$(ONEBRANCH_BUILD)' != ''">
<ApiValidator_Enable>false</ApiValidator_Enable>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(SolutionDir)submodules\cxplat\inc;$(SolutionDir)submodules\cxplat\src\inc;$(SolutionDir)inc;$(SolutionDir)\src\inc;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
Expand Down
32 changes: 1 addition & 31 deletions src/test/bin/winkernel/cxplattest.kernel.vcxproj
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|ARM64">
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|ARM64">
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
</ItemGroup>
<Import Project="$(SolutionDir)src\cxplat.props" />
<ItemGroup>
<ClCompile Include="driver.cpp" />
<ClCompile Include="control.cpp" />
Expand Down Expand Up @@ -49,12 +32,6 @@
<DriverType>KMDF</DriverType>
<_NT_TARGET_VERSION>0x0A00000A</_NT_TARGET_VERSION>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'" Label="Configuration">
<UseDebugLibraries>true</UseDebugLibraries>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Release'" Label="Configuration">
<UseDebugLibraries>false</UseDebugLibraries>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings" />
<ImportGroup Label="PropertySheets">
Expand All @@ -72,9 +49,6 @@
<PropertyGroup>
<ExternalIncludePath />
</PropertyGroup>
<PropertyGroup Condition="'$(ONEBRANCH_BUILD)' != ''">
<ApiValidator_Enable>false</ApiValidator_Enable>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>..;..\..;$(SolutionDir)src\inc;$(SolutionDir)build\winkernel\$(Platform)_$(Configuration)\inc;$(IntDir);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
Expand Down Expand Up @@ -103,10 +77,6 @@
<ItemGroup>
<FilesToPackage Include="$(TargetPath)" />
</ItemGroup>
<PropertyGroup>
<RunCodeAnalysis>true</RunCodeAnalysis>
<CodeAnalysisTreatWarningsAsErrors>true</CodeAnalysisTreatWarningsAsErrors>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
Expand Down

0 comments on commit 1cd64d3

Please sign in to comment.