<?xml version="1.0" encoding="utf-8"?>
<Project>
  <Import Project="..\VSProps\Base.Macros.props" />
  <Import Project="$(VSPropsDir)Base.Targets.props" />
  <PropertyGroup Label="Globals">
    <ProjectGuid>{d79392f7-06d6-4b4b-a39f-4d587c215d3a}</ProjectGuid>
  </PropertyGroup>
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
  <Import Project="$(VSPropsDir)Configuration.StaticLibrary.props" />
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
  <ImportGroup Label="ExtensionSettings" />
  <ImportGroup Label="PropertySheets">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    <Import Project="$(VSPropsDir)Base.props" />
    <Import Project="$(VSPropsDir)Base.Dolphin.props" />
    <Import Project="$(VSPropsDir)PCHUse.props" />
  </ImportGroup>
  <PropertyGroup Label="UserMacros" />
  <Import Project="DolphinLib.props" />
  <ImportGroup Condition="'$(Platform)'=='x64'">
    <Import Project="DolphinLib.x64.props" />
  </ImportGroup>
  <ImportGroup Condition="'$(Platform)'=='ARM64'">
    <Import Project="DolphinLib.ARM64.props" />
  </ImportGroup>
  <ItemGroup>
    <ProjectReference Include="$(CoreDir)Common\SCMRevGen.vcxproj">
      <Project>{41279555-f94f-4ebc-99de-af863c10c5c4}</Project>
    </ProjectReference>
  </ItemGroup>
  <Import Project="$(ExternalsDir)Bochs_disasm\exports.props" />
  <Import Project="$(ExternalsDir)bzip2\exports.props" />
  <Import Project="$(ExternalsDir)cpp-optparse\exports.props" />
  <Import Project="$(ExternalsDir)cubeb\exports.props" />
  <Import Project="$(ExternalsDir)curl\exports.props" />
  <Import Project="$(ExternalsDir)discord-rpc\exports.props" />
  <Import Project="$(ExternalsDir)ed25519\exports.props" />
  <Import Project="$(ExternalsDir)enet\exports.props" />
  <Import Project="$(ExternalsDir)FatFs\exports.props" />
  <Import Project="$(ExternalsDir)fmt\exports.props" />
  <Import Project="$(ExternalsDir)FreeSurround\exports.props" />
  <Import Project="$(ExternalsDir)glslang\exports.props" />
  <Import Project="$(ExternalsDir)imgui\exports.props" />
  <Import Project="$(ExternalsDir)liblzma\exports.props" />
  <Import Project="$(ExternalsDir)libspng\exports.props" />
  <Import Project="$(ExternalsDir)libusb\exports.props" />
  <Import Project="$(ExternalsDir)LZO\exports.props" />
  <Import Project="$(ExternalsDir)mbedtls\exports.props" />
  <Import Project="$(ExternalsDir)mGBA\exports.props" />
  <Import Project="$(ExternalsDir)miniupnpc\exports.props" />
  <Import Project="$(ExternalsDir)minizip\exports.props" />
  <Import Project="$(ExternalsDir)picojson\exports.props" />
  <Import Project="$(ExternalsDir)pugixml\exports.props" />
  <Import Project="$(ExternalsDir)SDL\exports.props" />
  <Import Project="$(ExternalsDir)SFML\exports.props" />
  <Import Project="$(ExternalsDir)soundtouch\exports.props" />
  <Import Project="$(ExternalsDir)spirv_cross\exports.props" />
  <Import Project="$(ExternalsDir)xxhash\exports.props" />
  <Import Project="$(ExternalsDir)zlib-ng\exports.props" />
  <Import Project="$(ExternalsDir)zstd\exports.props" />
  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
  <ImportGroup Label="ExtensionTargets" />
  <PropertyGroup>
    <BuildInfoTemplate>Common\build_info.txt.in</BuildInfoTemplate>
    <BuildInfoOutput>$(BinaryOutputDir)build_info.txt</BuildInfoOutput>
  </PropertyGroup>
  <ItemGroup>
    <Text Include="$(BuildInfoTemplate)" />
  </ItemGroup>
  <UsingTask TaskName="GetProductVersion"
    TaskFactory="CodeTaskFactory"
    AssemblyFile="$(MSBuildToolsPath)\Microsoft.Build.Tasks.Core.dll">
    <ParameterGroup>
      <Path ParameterType="System.String" Required="true" />
      <ProductVersion ParameterType="System.String" Output="true" />
    </ParameterGroup>
    <Task>
      <Using Namespace="System.Diagnostics"/>
      <Code Type="Fragment" Language="cs">
        <![CDATA[
          ProductVersion = FileVersionInfo.GetVersionInfo(Path).ProductVersion;
        ]]>
      </Code>
    </Task>
  </UsingTask>
  <Target Name="WriteBuildInfo" AfterTargets="Build" Inputs="$(BuildInfoTemplate)" Outputs="$(BuildInfoOutput)">
    <GetProductVersion Path="$(VCToolsRedistInstallDir)vc_redist.x64.exe">
      <Output PropertyName="VCToolsProductVersion" TaskParameter="ProductVersion" />
    </GetProductVersion>
    <Message Text="VCToolsProductVersion $(VCToolsProductVersion)" Importance="High" />
    <WriteLinesToFile
      File="$(BuildInfoOutput)"
      Lines="$([System.IO.File]::ReadAllText($(BuildInfoTemplate)).Replace('${VC_TOOLS_VERSION}', $(VCToolsProductVersion)))"
      Overwrite="true"
    />
  </Target>
</Project>