|
2 | 2 | <!-- Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the MIT License. See LICENSE in the project root for license information. --> |
3 | 3 | <Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
4 | 4 |
|
5 | | - <Target Name="WindowsAppRuntimeAutoInitializer"> |
6 | | - <PropertyGroup> |
7 | | - <WindowsAppRuntimeAutoInitializerPath>$(MSBuildThisFileDirectory)..\..\include\WindowsAppRuntimeAutoInitializer.cpp</WindowsAppRuntimeAutoInitializerPath> |
8 | | - <WindowsAppRuntimeAutoInitializerDefines /> |
9 | | - <WindowsAppRuntimeAutoInitializerDefines Condition="'$(WindowsAppSdkBootstrapInitialize)'=='true'">$(WindowsAppRuntimeAutoInitializerDefines);MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_BOOTSTRAP</WindowsAppRuntimeAutoInitializerDefines> |
10 | | - <WindowsAppRuntimeAutoInitializerDefines Condition="'$(WindowsAppSdkDeploymentManagerInitialize)'=='true'">$(WindowsAppRuntimeAutoInitializerDefines);MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_DEPLOYMENTMANAGER</WindowsAppRuntimeAutoInitializerDefines> |
11 | | - <WindowsAppRuntimeAutoInitializerDefines Condition="'$(WindowsAppSdkUndockedRegFreeWinRTInitialize)'=='true'">$(WindowsAppRuntimeAutoInitializerDefines);MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_UNDOCKEDREGFREEWINRT</WindowsAppRuntimeAutoInitializerDefines> |
12 | | - <WindowsAppRuntimeAutoInitializerDefines Condition="'$(WindowsAppSdkCompatibilityInitialize)'=='true'">$(WindowsAppRuntimeAutoInitializerDefines);MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_COMPATIBILITY</WindowsAppRuntimeAutoInitializerDefines> |
13 | | - </PropertyGroup> |
| 5 | + <PropertyGroup> |
| 6 | + <WindowsAppRuntimeAutoInitializerPath>$(MSBuildThisFileDirectory)..\..\include\WindowsAppRuntimeAutoInitializer.cpp</WindowsAppRuntimeAutoInitializerPath> |
| 7 | + <WindowsAppRuntimeAutoInitializerEnabled>false</WindowsAppRuntimeAutoInitializerEnabled> |
| 8 | + <WindowsAppRuntimeAutoInitializerEnabled Condition="'$(WindowsAppSdkBootstrapInitialize)'=='true'">true</WindowsAppRuntimeAutoInitializerEnabled> |
| 9 | + <WindowsAppRuntimeAutoInitializerEnabled Condition="'$(WindowsAppSdkDeploymentManagerInitialize)'=='true'">true</WindowsAppRuntimeAutoInitializerEnabled> |
| 10 | + <WindowsAppRuntimeAutoInitializerEnabled Condition="'$(WindowsAppSdkUndockedRegFreeWinRTInitialize)'=='true'">true</WindowsAppRuntimeAutoInitializerEnabled> |
| 11 | + <WindowsAppRuntimeAutoInitializerEnabled Condition="'$(WindowsAppSdkCompatibilityInitialize)'=='true'">true</WindowsAppRuntimeAutoInitializerEnabled> |
| 12 | + </PropertyGroup> |
14 | 13 |
|
15 | | - <!-- |
16 | | - Add a ClCompile for the 'WindowsAppRuntimeAutoInitializer'. This is done in two steps; |
17 | | - 1. Add the ClCompile item with no metadata, so the default metadata is applied. |
18 | | - 2. Add a second ClCompile item that uses the %(Identity) metadata to force a 'task batch' with just the one item |
19 | | - we want to modify. This allows us to use "%(PreprocessorDefinitions)" (without causing more task batching) to |
20 | | - append the PreprocessorDefinitions to apply. |
21 | | - --> |
| 14 | + <!-- If WindowsAppRuntimeAutoInitializerEnabled is true add a Target to add the WindowsAppRuntimeAutoInitializer.cpp file --> |
| 15 | + <Target Name="WindowsAppRuntimeAutoInitializer" Condition=" '$(WindowsAppRuntimeAutoInitializerEnabled)'=='true' "> |
22 | 16 | <ItemGroup> |
23 | 17 | <ClCompile Include="$(WindowsAppRuntimeAutoInitializerPath)" /> |
24 | | - <ClCompile Condition=" '%(Identity)' == '$(WindowsAppRuntimeAutoInitializerPath)' "> |
25 | | - <PrecompiledHeader>NotUsing</PrecompiledHeader> |
26 | | - <PreprocessorDefinitions>$(WindowsAppRuntimeAutoInitializerDefines);%(PreprocessorDefinitions)</PreprocessorDefinitions> |
27 | | - </ClCompile> |
28 | 18 | </ItemGroup> |
29 | 19 | </Target> |
30 | 20 |
|
|
34 | 24 | </BeforeClCompileTargets> |
35 | 25 | </PropertyGroup> |
36 | 26 |
|
| 27 | + <ItemDefinitionGroup> |
| 28 | + <!-- If any option is set that needs to a preprocessor definition, add the appropriate definition to the ClCompile |
| 29 | + ItemDefinitionGroup to apply to all compilations --> |
| 30 | + <ClCompile> |
| 31 | + <PreprocessorDefinitions Condition="'$(WindowsAppSdkBootstrapInitialize)'=='true'">MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_BOOTSTRAP;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| 32 | + <PreprocessorDefinitions Condition="'$(WindowsAppSdkDeploymentManagerInitialize)'=='true'">MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_DEPLOYMENTMANAGER;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| 33 | + <PreprocessorDefinitions Condition="'$(WindowsAppSdkUndockedRegFreeWinRTInitialize)'=='true'">MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_UNDOCKEDREGFREEWINRT;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| 34 | + <PreprocessorDefinitions Condition="'$(WindowsAppSdkCompatibilityInitialize)'=='true'">MICROSOFT_WINDOWSAPPSDK_AUTOINITIALIZE_COMPATIBILITY;%(PreprocessorDefinitions)</PreprocessorDefinitions> |
| 35 | + </ClCompile> |
| 36 | + </ItemDefinitionGroup> |
37 | 37 | </Project> |
0 commit comments