1<?xml version="1.0" encoding="utf-8"?>
2<!-- Copyright (C) 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html -->
3<Project DefaultTargets="Build" ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
4  <!-- This file is used to set configuration option for all projects. -->
5
6  <!-- Automatic PlatformToolset version selection. -->
7  <!-- If there is no DefaultPlatformToolset set, we will try to detect the version based on version of the build tools. -->
8  <PropertyGroup>
9    <BuildToolVersion>$(VisualStudioVersion)</BuildToolVersion>
10    <!-- Only use the MSBuildToolsVersion if we don't have the VisualStudioVersion and MSBuildToolsVersion is set to something other than Current. -->
11    <BuildToolVersion Condition="'$(BuildToolVersion)'=='' and '$(MSBuildToolsVersion)' != 'Current'">$(MSBuildToolsVersion)</BuildToolVersion>
12    <!-- Note:
13      v140 is the Visual Studio 2015 toolset. (14.0)
14      v141 is the Visual Studio 2017 toolset. (15.0)
15      v142 is the Visual Studio 2019 toolset. (16.0)
16    -->
17    <AutoDetectedPlatformToolset Condition="'$(BuildToolVersion)'=='14.0'">v140</AutoDetectedPlatformToolset>
18    <AutoDetectedPlatformToolset Condition="'$(BuildToolVersion)'=='15.0'">v141</AutoDetectedPlatformToolset>
19    <AutoDetectedPlatformToolset Condition="'$(BuildToolVersion)'=='16.0'">v142</AutoDetectedPlatformToolset>
20  </PropertyGroup>
21  <PropertyGroup Label="EmptyDefaultPlatformToolset">
22    <DefaultPlatformToolset Condition=" '$(DefaultPlatformToolset)' == '' ">$(AutoDetectedPlatformToolset)</DefaultPlatformToolset>
23  </PropertyGroup>
24  <PropertyGroup Label="PlatformToolset">
25    <PlatformToolset>$(DefaultPlatformToolset)</PlatformToolset>
26  </PropertyGroup>
27
28  <!-- This is the default SDK target. -->
29  <!--
30    If not already set, use the latest installed version of the Windows 10 SDK.
31    The Windows 10 SDK is backwards compatible to Windows 7, as long as WINVER and _WIN32_WINNT are set before compiling.
32    Note:
33      - With VS2019, using a value of "10.0" means that it will use the latest installed version.
34      - With VS2017, we need to manually detect the latest SDK version from the registry.
35      - With VS2015, use the Windows 8.1 SDK.
36  -->
37  <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' and '$(PlatformToolset)'=='v142'">
38    <WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
39  </PropertyGroup>
40  <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' and ('$(PlatformToolset)'=='v141' or '$(AutodetectWin10SDK)'=='true')">
41    <!-- Detect the SDK version. -->
42    <WindowsSdkInstallFolder_10 Condition="'$(WindowsSdkInstallFolder_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@InstallationFolder)</WindowsSdkInstallFolder_10>
43    <WindowsSdkInstallFolder_10 Condition="'$(WindowsSdkInstallFolder_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@InstallationFolder)</WindowsSdkInstallFolder_10>
44    <WindowsTargetPlatformVersion_10 Condition="'$(WindowsTargetPlatformVersion_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</WindowsTargetPlatformVersion_10>
45    <WindowsTargetPlatformVersion_10 Condition="'$(WindowsTargetPlatformVersion_10)' == ''">$(Registry:HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Microsoft SDKs\Windows\v10.0@ProductVersion)</WindowsTargetPlatformVersion_10>
46    <!-- Sometimes the version in the registry has the '.0' suffix, and sometimes it doesn't. Check and add it. -->
47    <WindowsTargetPlatformVersion_10 Condition="'$(WindowsTargetPlatformVersion_10)' != '' and !$(WindowsTargetPlatformVersion_10.EndsWith('.0'))">$(WindowsTargetPlatformVersion_10).0</WindowsTargetPlatformVersion_10>
48    <!-- Set the default. -->
49    <WindowsTargetPlatformVersion>$(WindowsTargetPlatformVersion_10)</WindowsTargetPlatformVersion>
50  </PropertyGroup>
51  <PropertyGroup Condition="'$(WindowsTargetPlatformVersion)'=='' and '$(PlatformToolset)'=='v140'">
52    <WindowsTargetPlatformVersion>8.1</WindowsTargetPlatformVersion>
53  </PropertyGroup>
54  <!-- Disable MSBuild warning about Linker OutputFile. -->
55  <PropertyGroup>
56    <!-- For example: MSBuild complains that the common project creates "icuuc62.dll" rather than "common.dll". However, this is intentional. -->
57    <MSBuildWarningsAsMessages>MSB8012</MSBuildWarningsAsMessages>
58  </PropertyGroup>
59</Project>
60