-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Expand file tree
/
Copy pathDirectory.Build.props
More file actions
56 lines (52 loc) · 3.48 KB
/
Copy pathDirectory.Build.props
File metadata and controls
56 lines (52 loc) · 3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Consume containing solution build props if present. -->
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" Condition="'' != $([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />
<PropertyGroup>
<WinGetMacros Condition="'$(UseProdCLSIDs)' == 'true'">USE_PROD_CLSIDS;$(WinGetMacros)</WinGetMacros>
<WinGetMacros Condition="'$(WingetDisableTestHooks)' == 'true'">AICLI_DISABLE_TEST_HOOKS;$(WinGetMacros)</WinGetMacros>
<WinGetMacros Condition="'$(WingetDisableExperimentalFeatures)' == 'true'">WINGET_DISABLE_EXPERIMENTAL_FEATURES;$(WinGetMacros)</WinGetMacros>
<WinGetMacros Condition="'$(UseProdWingetServer)' == 'true'">USE_PROD_WINGET_SERVER;$(WinGetMacros)</WinGetMacros>
<WinGetMacros Condition="'$(WingetEnableReleaseBuild)' == 'true'">WINGET_ENABLE_RELEASE_BUILD;$(WinGetMacros)</WinGetMacros>
</PropertyGroup>
<!-- For C++ -->
<PropertyGroup Label="Configuration">
<PlatformToolset Condition="'$(VisualStudioVersion)' == '16.0'">v142</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '17.0'">v143</PlatformToolset>
<PlatformToolset Condition="'$(VisualStudioVersion)' == '18.0'">v145</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<!-- Disable /await from CppWinRT. Can be removed when https://github.com/microsoft/cppwinrt/pull/1521 comes through (looks like it will be 3.0+). -->
<CppWinRTEnableLegacyCoroutines>false</CppWinRTEnableLegacyCoroutines>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(WinGetMacros)' != ''">
<ClCompile>
<PreprocessorDefinitions>$(WinGetMacros)%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup>
<ClCompile>
<MultiProcessorCompilation>true</MultiProcessorCompilation>
<!-- Enable /await:strict. Can be removed when https://github.com/microsoft/cppwinrt/pull/1521 comes through (looks like it will be 3.0+). -->
<AdditionalOptions>%(AdditionalOptions) /await:strict</AdditionalOptions>
</ClCompile>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)'=='ReleaseStatic'">
<Link>
<!-- Link statically against the runtime and STL, but link dynamically against the CRT by ignoring the static CRT
lib and instead linking against the Universal CRT DLL import library. This "hybrid" linking mechanism is
supported according to the CRT maintainer. Dynamic linking against the CRT makes the binaries a bit smaller
than they would otherwise be if the CRT, runtime, and STL were all statically linked in.
See https://aka.ms/hybridcrt for more details. -->
<IgnoreSpecificDefaultLibraries>%(IgnoreSpecificDefaultLibraries);libucrt.lib</IgnoreSpecificDefaultLibraries>
<AdditionalOptions>%(AdditionalOptions) /defaultlib:ucrt.lib</AdditionalOptions>
</Link>
</ItemDefinitionGroup>
<!-- For C# -->
<PropertyGroup Condition="'$(WinGetMacros)' != ''">
<DefineConstants>$(WinGetMacros)$(DefineConstants)</DefineConstants>
</PropertyGroup>
<!-- To prevent build agents from running out of disk space, clean as we go. -->
<Target Name="CleanIntermediateFiles" AfterTargets="Build" Condition="'$(WingetCleanIntermediateFiles)'=='true'">
<RemoveDir Directories="$(IntDir)" />
</Target>
</Project>