<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup Label="Globals">
    <ProjectGuid>{CA5CAD1A-C46D-4588-B1C0-40F31AE9100B}</ProjectGuid>
    <ProjectName>TerminalConnection</ProjectName>
    <RootNamespace>Microsoft.Terminal.TerminalConnection</RootNamespace>
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <SubSystem>Console</SubSystem>
    <OpenConsoleUniversalApp>true</OpenConsoleUniversalApp>
    <PgoTarget>true</PgoTarget>
  </PropertyGroup>
  <PropertyGroup Label="NuGet Dependencies">
    <TerminalCppWinrt>true</TerminalCppWinrt>
  </PropertyGroup>
  <Import Project="..\..\..\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />
  <Import Project="$(OpenConsoleDir)src\common.nugetversions.props" />
  <Import Project="$(OpenConsoleDir)src\cppwinrt.build.pre.props" />
  <ItemGroup>
    <ClInclude Include="AzureClientID.h" />
    <ClInclude Include="BaseTerminalConnection.h" />
    <ClInclude Include="ConnectionInformation.h">
      <DependentUpon>ConnectionInformation.idl</DependentUpon>
    </ClInclude>
    <ClInclude Include="AzureConnection.h">
      <DependentUpon>AzureConnection.idl</DependentUpon>
    </ClInclude>
    <ClInclude Include="CTerminalHandoff.h" />
    <ClInclude Include="pch.h" />
    <ClInclude Include="ConptyConnection.h">
      <DependentUpon>ConptyConnection.idl</DependentUpon>
    </ClInclude>
    <ClInclude Include="EchoConnection.h">
      <DependentUpon>EchoConnection.idl</DependentUpon>
    </ClInclude>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="CTerminalHandoff.cpp" />
    <ClCompile Include="init.cpp" />
    <ClCompile Include="ConnectionInformation.cpp">
      <DependentUpon>ConnectionInformation.idl</DependentUpon>
    </ClCompile>
    <ClCompile Include="AzureConnection.cpp">
      <DependentUpon>AzureConnection.idl</DependentUpon>
    </ClCompile>
    <ClCompile Include="pch.cpp">
      <PrecompiledHeader>Create</PrecompiledHeader>
    </ClCompile>
    <ClCompile Include="EchoConnection.cpp">
      <DependentUpon>EchoConnection.idl</DependentUpon>
    </ClCompile>
    <ClCompile Include="ConptyConnection.cpp">
      <DependentUpon>ConptyConnection.idl</DependentUpon>
    </ClCompile>
    <ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
  </ItemGroup>
  <ItemGroup>
    <Midl Include="ConnectionInformation.idl" />
    <Midl Include="ITerminalConnection.idl" />
    <Midl Include="ConptyConnection.idl" />
    <Midl Include="EchoConnection.idl" />
    <Midl Include="AzureConnection.idl" />
  </ItemGroup>
  <ItemGroup>
    <PRIResource Include="Resources\en-US\Resources.resw">
      <SubType>Designer</SubType>
    </PRIResource>
    <OCResourceDirectory Include="Resources" />
  </ItemGroup>
  <!-- ========================= Project References ======================== -->
  <ItemGroup>
    <!--
      the packaging project won't recurse through our dependencies, you have to
      make sure that if you add a cppwinrt dependency to any of these projects,
      you also update all the consumers
    -->
    <ProjectReference Include="$(OpenConsoleDir)src\types\lib\types.vcxproj">
      <Project>{18D09A24-8240-42D6-8CB6-236EEE820263}</Project>
    </ProjectReference>
    <ProjectReference Include="$(OpenConsoleDir)src\cascadia\WinRTUtils\WinRTUtils.vcxproj">
      <Project>{CA5CAD1A-039A-4929-BA2A-8BEB2E4106FE}</Project>
      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
    </ProjectReference>
    <ProjectReference Include="..\..\winconpty\lib\winconptylib.vcxproj">
      <Project>{58a03bb2-df5a-4b66-91a0-7ef3ba01269a}</Project>
    </ProjectReference>
  </ItemGroup>
  <Import Project="$(OpenConsoleDir)src\cppwinrt.build.post.props" />
  <ItemDefinitionGroup>
    <ClCompile>
      <!-- By defining this here, we ensure that we don't try to dllimport conpty -->
      <PreprocessorDefinitions>CONPTY_IMPEXP=;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <AdditionalIncludeDirectories>$(IntDir)..\OpenConsoleProxy;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ClCompile>
    <Link>
      <AdditionalDependencies>$(OpenConsoleCommonOutDir)\conptylib.lib;%(AdditionalDependencies)</AdditionalDependencies>
    </Link>
  </ItemDefinitionGroup>
  <Import Project="$(SolutionDir)build\rules\CollectWildcardResources.targets" />
  <!-- This -must- go after cppwinrt.build.post.props because that includes many VS-provided props including appcontainer.common.props, which stomps on what cppwinrt.targets did. -->
  <Import Project="$(OpenConsoleDir)src\common.nugetversions.targets" />
</Project>