<?xml version="1.0" encoding="utf-8" ?>
<!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. -->


<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">

  <PropertyGroup Condition=" $(StaticAnalysisEnabled) and ($(VS2013Available) or $(VS2015Available) or $(VS2017Available)) ">
    <PlatformToolset Condition="$(VS2013Available)">v120</PlatformToolset>
    <PlatformToolset Condition="$(VS2015Available)">v140</PlatformToolset>
    <PlatformToolset Condition="$(VS2017Available)">v140</PlatformToolset>
    <RunCodeAnalysis>true</RunCodeAnalysis>
    <CodeAnalysisTreatWarningsAsErrors>false</CodeAnalysisTreatWarningsAsErrors>
    <!-- turn off deprecation warning -->
    <DisableSpecificCompilerWarnings>4996</DisableSpecificCompilerWarnings>
  </PropertyGroup>

  <PropertyGroup>
    <!-- If available and we're not explicitly setting the toolset, use VS2017; otherwise fall back to VS2015, VS2013, VS2012, VS2010, in that order. -->
    <PlatformToolset Condition=" $(VS2017Available) and ('$(PlatformToolset)'=='' or '$(DefaultToVS)'=='2017') ">v141_xp</PlatformToolset>
    <PlatformToolset Condition=" $(VS2015Available) and ('$(PlatformToolset)'=='' or '$(DefaultToVS)'=='2015') ">v140_xp</PlatformToolset>
    <PlatformToolset Condition=" $(VS2013Available) and ('$(PlatformToolset)'=='' or '$(DefaultToVS)'=='2013') ">v120_xp</PlatformToolset>
    <PlatformToolset Condition=" $(VS2012Available) and ('$(PlatformToolset)'=='' or '$(DefaultToVS)'=='2012') ">v110_xp</PlatformToolset>
    <PlatformToolset Condition=" $(VS2010Available) and ('$(PlatformToolset)'=='' or '$(DefaultToVS)'=='2010') ">v100</PlatformToolset>
    <ProjectSubSystem Condition=" '$(ProjectSubSystem)'=='' ">Windows</ProjectSubSystem>
    <!-- VS2015: turn off 'typedef ignored when no variable declared' -->
    <!-- VS2015: turn off 'declaration hides class member' -->
    <DisableSpecificCompilerWarnings Condition=" $(PlatformToolset.StartsWith('v14')) ">$(DisableSpecificCompilerWarnings);4091;4458</DisableSpecificCompilerWarnings>
    <DisableSpecificCompilerWarnings Condition=" '$(Platform)'=='arm' ">$(DisableSpecificCompilerWarnings);4996</DisableSpecificCompilerWarnings>
  </PropertyGroup>

  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />

  <!-- Multi-target static libraries get a suffix to prevent collisions. -->
  <PropertyGroup>
    <MultiTargetDirSuffix Condition=" '$(PlatformToolset)'=='v100' ">2010</MultiTargetDirSuffix>
    <MultiTargetDirSuffix Condition=" '$(PlatformToolset)'=='v110_xp' ">2012</MultiTargetDirSuffix>
    <MultiTargetDirSuffix Condition=" '$(PlatformToolset)'=='v120_xp' ">2013</MultiTargetDirSuffix>
    <MultiTargetDirSuffix Condition=" '$(PlatformToolset)'=='v140_xp' ">2015</MultiTargetDirSuffix>
    <MultiTargetDirSuffix Condition=" '$(PlatformToolset)'=='v141_xp' ">2017</MultiTargetDirSuffix>
  </PropertyGroup>

  <PropertyGroup>
    <IntDir>$(IntermediateOutputPath)</IntDir>
    <IntDir Condition=" '$(MultiTargetLibrary)'=='true' ">$(IntDir)$(MultiTargetDirSuffix)\</IntDir>

    <OutDir>$(OutputPath)$(OutputSubDirectory)</OutDir>
    <OutDir Condition="!HasTrailingSlash('$(OutDir)')">$(OutDir)\</OutDir>
    <OutDir Condition=" '$(MultiTargetLibrary)'=='true' ">$(OutDir)$(MultiTargetDirSuffix)\</OutDir>

    <AdditionalMultiTargetLibraryPath Condition=" '$(MultiTargetLibrary)'!='true' ">$(OutputPath)$(MultiTargetDirSuffix)\</AdditionalMultiTargetLibraryPath>
  </PropertyGroup>

  <PropertyGroup>
    <ResourceOnlyDll Condition=" '$(ResourceOnlyDll)'=='' ">false</ResourceOnlyDll>
    <GenerateManifest Condition="$(ResourceOnlyDll)">false</GenerateManifest>
    <WindowsSDKDesktopARMSupport Condition=" '$(Platform)'=='arm' and Exists('$(PlatformSdkArmLibraryRoot)') ">true</WindowsSDKDesktopARMSupport>
    <ArmLibraryDirectories Condition=" '$(Platform)'=='arm' ">$(PlatformSdkArmLibraryRoot)\</ArmLibraryDirectories>
    <ArmPreprocessorDefinitions Condition=" '$(Platform)'=='arm' ">ARM</ArmPreprocessorDefinitions>
    <UnicodePreprocessorDefinitions Condition=" '$(CharacterSet)'=='Unicode' ">UNICODE;_UNICODE</UnicodePreprocessorDefinitions>
    <StaticLibPreprocessorDefinitions Condition=" '$(ConfigurationType)'=='StaticLibrary' ">_LIB</StaticLibPreprocessorDefinitions>
  </PropertyGroup>

  <PropertyGroup Condition=" '$(CLRSupport)'=='true' ">
    <DisableSpecificCompilerWarnings>4564;4800</DisableSpecificCompilerWarnings>
    <LinkDelaySign>$(DelaySign)</LinkDelaySign>
    <LinkKeyFile>$(AssemblyOriginatorKeyFile)</LinkKeyFile>
  </PropertyGroup>

  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />

  <ItemDefinitionGroup>
    <ClCompile>
      <DisableSpecificWarnings>$(DisableSpecificCompilerWarnings)</DisableSpecificWarnings>
      <WarningLevel>Level4</WarningLevel>
      <AdditionalIncludeDirectories>$(WixVersionPath);$(ProjectDir)inc;$(MSBuildProjectDirectory);$(IntDir);$(SqlCESdkIncludePath);$(ProjectAdditionalIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
      <PreprocessorDefinitions>WIN32;_WINDOWS;_WIN32_MSI=500;_WIN32_WINNT=0x0501;$(ArmPreprocessorDefinitions);$(UnicodePreprocessorDefinitions);_CRT_STDIO_LEGACY_WIDE_SPECIFIERS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <PrecompiledHeader>Use</PrecompiledHeader>
      <PrecompiledHeaderFile>precomp.h</PrecompiledHeaderFile>
      <CallingConvention>StdCall</CallingConvention>
      <TreatWarningAsError>true</TreatWarningAsError>
      <ExceptionHandling>false</ExceptionHandling>
      <AdditionalOptions>-YlprecompDefine</AdditionalOptions>
      <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/Zc:threadSafeInit- %(AdditionalOptions)</AdditionalOptions>
      <MultiProcessorCompilation>true</MultiProcessorCompilation>
    </ClCompile>
    <ResourceCompile>
      <PreprocessorDefinitions>$(ArmPreprocessorDefinitions);%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <AdditionalIncludeDirectories>$(WixVersionPath);$(WixRoot)src\common;$(ProjectAdditionalResourceIncludeDirectories);%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
    </ResourceCompile>
    <Lib>
      <AdditionalLibraryDirectories>$(OutputPath);$(AdditionalMultiTargetLibraryPath);$(ProjectAdditionalLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
    </Lib>
    <Link>
      <SubSystem>$(ProjectSubSystem)</SubSystem>
      <ModuleDefinitionFile>$(ProjectModuleDefinitionFile)</ModuleDefinitionFile>
      <NoEntryPoint>$(ResourceOnlyDll)</NoEntryPoint>
      <GenerateDebugInformation>true</GenerateDebugInformation>
      <AdditionalDependencies>$(ProjectAdditionalLinkLibraries);advapi32.lib;comdlg32.lib;user32.lib;oleaut32.lib;gdi32.lib;shell32.lib;ole32.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
      <AdditionalLibraryDirectories>$(OutputPath);$(AdditionalMultiTargetLibraryPath);$(ArmLibraryDirectories);$(ProjectAdditionalLinkLibraryDirectories);%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
      <AdditionalOptions Condition=" $(PlatformToolset.StartsWith('v14')) ">/IGNORE:4099 %(AdditionalOptions)</AdditionalOptions>
    </Link>
  </ItemDefinitionGroup>

  <ItemDefinitionGroup Condition=" '$(Platform)'=='Win32' and '$(PlatformToolset)'!='v100'">
    <ClCompile>
      <EnableEnhancedInstructionSet>NoExtensions</EnableEnhancedInstructionSet>
    </ClCompile>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition=" '$(Platform)'=='arm' ">
    <ClCompile>
      <CallingConvention>CDecl</CallingConvention>
    </ClCompile>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition=" '$(ConfigurationType)'=='StaticLibrary' ">
    <ClCompile>
      <DebugInformationFormat>OldStyle</DebugInformationFormat>
      <OmitDefaultLibName>true</OmitDefaultLibName>
      <IgnoreAllDefaultLibraries>true</IgnoreAllDefaultLibraries>
    </ClCompile>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' ">
    <ClCompile>
      <Optimization>Disabled</Optimization>
      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
      <PreprocessorDefinitions>_DEBUG;DEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
    </ClCompile>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition=" '$(Configuration)'=='Debug' and '$(CLRSupport)'=='true' ">
    <ClCompile>
      <BasicRuntimeChecks></BasicRuntimeChecks>
      <RuntimeLibrary>MultiThreadedDebugDll</RuntimeLibrary>
    </ClCompile>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' ">
    <ClCompile>
      <Optimization>MinSpace</Optimization>
      <PreprocessorDefinitions>NDEBUG;%(PreprocessorDefinitions)</PreprocessorDefinitions>
      <FunctionLevelLinking>true</FunctionLevelLinking>
      <IntrinsicFunctions>true</IntrinsicFunctions>
      <RuntimeLibrary>MultiThreaded</RuntimeLibrary>
    </ClCompile>
    <Link>
      <EnableCOMDATFolding>true</EnableCOMDATFolding>
      <OptimizeReferences>true</OptimizeReferences>
    </Link>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition=" '$(Configuration)'=='Release' and '$(CLRSupport)'=='true' ">
    <ClCompile>
      <BasicRuntimeChecks></BasicRuntimeChecks>
      <RuntimeLibrary>MultiThreadedDll</RuntimeLibrary>
    </ClCompile>
  </ItemDefinitionGroup>
  <ItemDefinitionGroup Condition=" '$(CLRSupport)'=='true' ">
    <Link>
      <KeyFile>$(LinkKeyFile)</KeyFile>
      <DelaySign>$(LinkDelaySign)</DelaySign>
    </Link>
  </ItemDefinitionGroup>

  <ItemGroup Condition="!$(ResourceOnlyDll)">
    <ClCompile Include="$(WixRoot)src\common\precomp.cpp">
      <PrecompiledHeader>Create</PrecompiledHeader>
    </ClCompile>
  </ItemGroup>
</Project>
