﻿<!--
***********************************************************************************************
Platform.Common.props

WARNING:  DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
          created a backup copy.  Incorrect changes to this file will make it
          impossible to load or build your projects from the command-line or the IDE.

Copyright (C) Microsoft Corporation. All rights reserved.
***********************************************************************************************
-->

<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <!-- If VS is running on ARM64 machine, default to Local debugger -->
  <PropertyGroup Condition="exists('$(VSInstallDir)\Common7\IDE\Remote Debugger\arm64\msvsmon.exe')">
    <_IncludeWindowsLocalDebugger>true</_IncludeWindowsLocalDebugger>
    <DebuggerFlavor Condition="'$(DebuggerFlavor)' == ''">WindowsLocalDebugger</DebuggerFlavor>
    <!-- UWP default debugger is set to local in AppContainer props -->
  </PropertyGroup>

  <PropertyGroup Condition="'$(_IncludeWindowsLocalDebugger)' != 'true'">
    <DebuggerFlavor Condition="'$(WindowsAppContainer)' == 'true' and '$(AppxPackage)' == 'true'">UWPRemoteDebugger</DebuggerFlavor>
    <DebuggerFlavor Condition="'$(DebuggerFlavor)' == '' and ('$(WindowsAppContainer)' != 'true' or '$(AppxPackage)' != 'true')">WindowsRemoteDebugger</DebuggerFlavor>
  </PropertyGroup>

  <ItemDefinitionGroup>
    <ClCompile>
      <EnablePREfast Condition="'%(ClCompile.EnablePREfast)' == ''">false</EnablePREfast>
      <OmitFramePointers Condition="'%(ClCompile.OmitFramePointers)' == ''">false</OmitFramePointers>
      <DebugInformationFormat  Condition="'%(ClCompile.DebugInformationFormatDefined)' != 'true' and '$(UseDebugLibraries)' == 'true' and '$(EnableASAN)' != 'true' and ('$(CLRSupport)' == '' or '$(CLRSupport)' == 'false')">EditAndContinue</DebugInformationFormat>
    </ClCompile>
    <Link Condition="'$(BuildAsX)' != 'true'">
      <TargetMachine Condition="'%(Link.TargetMachine)' == ''">MachineARM64</TargetMachine>
    </Link>
    <Link Condition="'$(BuildAsX)' == 'true'">
      <TargetMachine Condition="'%(Link.TargetMachine)' == ''">MachineARM64X</TargetMachine>
    </Link>
    <Lib Condition="'$(BuildAsX)' != 'true'">
      <TargetMachine Condition="'%(Lib.TargetMachine)' == ''">MachineARM64</TargetMachine>
    </Lib>
    <Lib Condition="'$(BuildAsX)' == 'true'">
      <TargetMachine Condition="'%(Lib.TargetMachine)' == ''">MachineARM64X</TargetMachine>
    </Lib>
    <ImpLib Condition="'$(BuildAsX)' != 'true'">
      <TargetMachine Condition="'%(ImpLib.TargetMachine)' == ''">MachineARM64</TargetMachine>
    </ImpLib>
    <ImpLib Condition="'$(BuildAsX)' == 'true'">
      <TargetMachine Condition="'%(ImpLib.TargetMachine)' == ''">MachineARM64X</TargetMachine>
    </ImpLib>
    <Midl>
      <TargetEnvironment Condition="'%(Midl.TargetEnvironment)' == ''">ARM64</TargetEnvironment>
    </Midl>
  </ItemDefinitionGroup>
</Project>
