Duckstation/dep/winpixeventruntime/WinPixEventRuntime.props
2023-09-02 21:44:07 +10:00

40 lines
2.2 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Label="UserMacros">
<BinaryOutputDir>$(SolutionDir)bin\$(Platform)\</BinaryOutputDir>
<WinPixEventRuntimeDir>$(SolutionDir)dep\winpixeventruntime\</WinPixEventRuntimeDir>
</PropertyGroup>
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(WinPixEventRuntimeDir)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<AdditionalLibraryDirectories Condition="'$(Platform)'=='x64'">$(WinPixEventRuntimeDir)lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories Condition="'$(Platform)'=='ARM64'">$(WinPixEventRuntimeDir)libarm64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>WinPixEventRuntime.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
<Lib>
<AdditionalLibraryDirectories Condition="'$(Platform)'=='x64'">$(WinPixEventRuntimeDir)lib64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalLibraryDirectories Condition="'$(Platform)'=='ARM64'">$(WinPixEventRuntimeDir)libarm64;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<AdditionalDependencies>WinPixEventRuntime.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Lib>
</ItemDefinitionGroup>
<!--Copy the needed dlls-->
<ItemGroup>
<WinPixEventRuntimeDlls Condition="'$(Platform)'=='x64'" Include="$(WinPixEventRuntimeDir)bin64\WinPixEventRuntime.dll" />
<WinPixEventRuntimeDlls Condition="'$(Platform)'=='ARM64'" Include="$(WinPixEventRuntimeDir)binarm64\WinPixEventRuntime.dll" />
</ItemGroup>
<Target Name="WinPixEventRuntimeCopyBinaries"
AfterTargets="Build"
Inputs="@(WinPixEventRuntimeDlls)"
Outputs="@(WinPixEventRuntimeDlls -> '$(BinaryOutputDir)%(RecursiveDir)%(Filename)%(Extension)')">
<Message Text="Copying WinPixEventRuntime .dlls" Importance="High" />
<Copy
SourceFiles="@(WinPixEventRuntimeDlls)"
DestinationFolder="$(BinaryOutputDir)"
SkipUnchangedFiles="true"
/>
</Target>
</Project>