<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <Import Project="..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.2\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.props" Condition="Exists('..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.2\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.props')" />
  <Import Project="..\..\..\common.openconsole.props" Condition="'$(OpenConsoleDir)'==''" />

  <PropertyGroup Label="Globals">
    <CppWinRTRootNamespaceAutoMerge>true</CppWinRTRootNamespaceAutoMerge>
    <ProjectGuid>{b0ac39d6-7b40-49a9-8202-58549bae1fb1}</ProjectGuid>
    <ProjectName>WindowsTerminalUniversal</ProjectName>
    <RootNamespace>WindowsTerminalUniversal</RootNamespace>
    <OpenConsoleUniversalApp>true</OpenConsoleUniversalApp>
  </PropertyGroup>

  <Import Project="..\..\cppwinrt.build.pre.props" />

  <ItemDefinitionGroup>
    <ClCompile>
      <DisableSpecificWarnings>4453;28204;%(DisableSpecificWarnings)</DisableSpecificWarnings>
    </ClCompile>
    <Link>
      <GenerateWindowsMetadata>false</GenerateWindowsMetadata>
    </Link>
  </ItemDefinitionGroup>

  <ItemGroup>
    <ClInclude Include="pch.h" />
  </ItemGroup>
  <ItemGroup>
    <AppxManifest Include="Package.appxmanifest" Condition="'$(WindowsTerminalOfficialBuild)'=='true'">
      <SubType>Designer</SubType>
    </AppxManifest>
    <AppxManifest Include="Package-Dev.appxmanifest" Condition="'$(WindowsTerminalOfficialBuild)'!='true'">
      <SubType>Designer</SubType>
    </AppxManifest>
  </ItemGroup>
  <ItemGroup>
    <!-- Resources -->
    <!-- This resw only defines things that are used in this package's AppxManifest,
         so it's not in the common resource items. -->
    <PRIResource Include="Resources\en-US\Resources.resw" />
    <PRIResource Include="Resources\Resources.resw" />
    <PRIResource Include="Resources\Resources.devicefamily-core.resw" />
    <OCResourceDirectory Include="Resources" />
  </ItemGroup>
  <PropertyGroup>
    <!-- This is picked up by CascadiaResources.build.items. -->
    <WindowsTerminalAssetSuffix>-Universal</WindowsTerminalAssetSuffix>
  </PropertyGroup>
  <PropertyGroup Condition="'$(WindowsTerminalOfficialBuild)'!='true'">
    <!-- This is picked up by CascadiaResources.build.items. -->
    <WindowsTerminalAssetSuffix>$(WindowsTerminalAssetSuffix)Dev</WindowsTerminalAssetSuffix>
  </PropertyGroup>
  <Import Project="$(MSBuildThisFileDirectory)..\CascadiaResources.build.items" />
  <ItemGroup>
    <ClCompile Include="main.cpp" />
    <ClCompile Include="pch.cpp">
      <PrecompiledHeader>Create</PrecompiledHeader>
    </ClCompile>
  </ItemGroup>
  <ItemGroup>
    <None Include="packages.config" />
  </ItemGroup>
  <ItemGroup>
    <ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalControl\dll\TerminalControl.vcxproj" />
    <ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalConnection\TerminalConnection.vcxproj" />
    <ProjectReference Include="$(OpenConsoleDir)src\cascadia\TerminalSettingsModel\dll\Microsoft.Terminal.Settings.Model.vcxproj" />
    <ProjectReference Include="..\TerminalApp\dll\TerminalApp.vcxproj">
      <Project>{ca5cad1a-44bd-4ac7-ac72-f16e576fdd12}</Project>
    </ProjectReference>
  </ItemGroup>
  <ItemGroup>
    <Image Include="internal-background.png" />
  </ItemGroup>

  <!-- Manually add a reference to Core here. We need this so MDMERGE will know
  where the Core types are defined. However, we need to do it exactly like this,
  because the Core project is a lib not a dll, so it can't be ProjectReference'd
  like everything else. It does get built into TerminalControl.dll, so we don't
  need to worry about that. -->
  <ItemGroup>
    <Reference Include="Microsoft.Terminal.Core">
      <HintPath>$(OpenConsoleCommonOutDir)TerminalCore\Microsoft.Terminal.Core.winmd</HintPath>
      <IsWinMDFile>true</IsWinMDFile>
      <Private>false</Private>
      <CopyLocalSatelliteAssemblies>false</CopyLocalSatelliteAssemblies>
    </Reference>
  </ItemGroup>

  <ImportGroup Label="ExtensionTargets">
    <Import Project="..\..\..\packages\Microsoft.UI.Xaml.2.5.0-prerelease.201202003\build\native\Microsoft.UI.Xaml.targets" Condition="Exists('..\..\..\packages\Microsoft.UI.Xaml.2.5.0-prerelease.201202003\build\native\Microsoft.UI.Xaml.targets')" />
    <Import Project="..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.2\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets" Condition="Exists('..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.2\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets')" />
  </ImportGroup>
  <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
    <PropertyGroup>
      <ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them.  For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
    </PropertyGroup>
    <Error Condition="!Exists('..\..\..\packages\Microsoft.UI.Xaml.2.5.0-prerelease.201202003\build\native\Microsoft.UI.Xaml.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.UI.Xaml.2.5.0-prerelease.201202003\build\native\Microsoft.UI.Xaml.targets'))" />
    <Error Condition="!Exists('..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.2\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.props')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.2\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.props'))" />
    <Error Condition="!Exists('..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.2\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.Toolkit.Win32.UI.XamlApplication.6.1.2\build\native\Microsoft.Toolkit.Win32.UI.XamlApplication.targets'))" />
  </Target>

  <Import Project="$(SolutionDir)build\rules\CollectWildcardResources.targets" />
  <Import Project="..\..\cppwinrt.build.post.props" />
</Project>
