<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup Label="Globals">
    <ProjectGuid>{7615F03F-E56D-4DB4-B23D-BD4FB80DB36F}</ProjectGuid>
    <ProjectName>Microsoft.Terminal.UI.Markdown</ProjectName>
    <RootNamespace>Microsoft.Terminal.UI.Markdown</RootNamespace>
    <ConfigurationType>DynamicLibrary</ConfigurationType>
    <SubSystem>Console</SubSystem>
    <OpenConsoleUniversalApp>true</OpenConsoleUniversalApp>
    <!-- C++/WinRT sets the depth to 1 if there is a XAML file in the project
         Unfortunately for us, we need it to be 4. When the namespace merging
         depth is 1, Microsoft.Terminal.UI.Markdown becomes "Microsoft",
         and our WinMD file becomes "Microsoft". Because WinRT is very
         namespace-driven, this winmd is considered to contain the entire
         Microsoft namespace. This is, obviously, not great. None of our other
         projects compile properly when they depend on this "Microsoft.winmd."
    -->
    <CppWinRTNamespaceMergeDepth>4</CppWinRTNamespaceMergeDepth>
    <XamlComponentResourceLocation>nested</XamlComponentResourceLocation>
    <VersionInfoFileDescription>Windows Terminal Markdown Control Library</VersionInfoFileDescription>
  </PropertyGroup>
  <PropertyGroup Label="NuGet Dependencies">
    <TerminalCppWinrt>true</TerminalCppWinrt>
    <TerminalMUX>true</TerminalMUX>
  </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="pch.h" />
    <ClInclude Include="Builder.h">
      <DependentUpon>Builder.idl</DependentUpon>
    </ClInclude>
    <ClInclude Include="MarkdownToXaml.h" />
    <ClInclude Include="CodeBlock.h">
      <DependentUpon>CodeBlock.xaml</DependentUpon>
    </ClInclude>
  </ItemGroup>
  <ItemGroup>
    <ClCompile Include="init.cpp" />
    <ClCompile Include="pch.cpp">
      <PrecompiledHeader>Create</PrecompiledHeader>
    </ClCompile>
    <ClCompile Include="Builder.cpp">
      <DependentUpon>Builder.idl</DependentUpon>
    </ClCompile>
    <ClCompile Include="CodeBlock.cpp">
      <DependentUpon>CodeBlock.xaml</DependentUpon>
      <SubType>Code</SubType>
    </ClCompile>
    <ClCompile Include="MarkdownToXaml.cpp" />
    <ClCompile Include="$(GeneratedFilesDir)module.g.cpp" />
  </ItemGroup>
  <ItemGroup>
    <Midl Include="Builder.idl" />
    <Midl Include="CodeBlock.idl">
      <DependentUpon>CodeBlock.xaml</DependentUpon>
      <SubType>Code</SubType>
    </Midl>
  </ItemGroup>
  <ItemGroup>
    <Page Include="CodeBlock.xaml">
      <SubType>Designer</SubType>
    </Page>
  </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="..\UIHelpers\UIHelpers.vcxproj">
      <Project>{6515f03f-e56d-4db4-b23d-ac4fb80db36f}</Project>
    </ProjectReference>
  </ItemGroup>
  <Import Project="$(OpenConsoleDir)src\cppwinrt.build.post.props" />
  <!-- 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>