зеркало из https://github.com/microsoft/cppwinrt.git
Merge branch 'master' into user/jlaans/xaml-targets
This commit is contained in:
Коммит
54d1d38fca
|
@ -17,13 +17,6 @@ Copyright (C) Microsoft Corporation. All rights reserved.
|
|||
<WinMDAssembly>true</WinMDAssembly>
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- For a static library we don't want the winmd/lib/pdb to be packaged -->
|
||||
<PropertyGroup Condition="'$(ConfigurationType)' == 'StaticLibrary'">
|
||||
<IncludeCopyWinMDArtifactsOutputGroup>false</IncludeCopyWinMDArtifactsOutputGroup>
|
||||
<IncludeBuiltProjectOutputGroup>false</IncludeBuiltProjectOutputGroup>
|
||||
<IncludeDebugSymbolsProjectOutputGroup>false</IncludeDebugSymbolsProjectOutputGroup>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemDefinitionGroup>
|
||||
<ClCompile>
|
||||
<CompileAsWinRT Condition="'$(CppWinRTProjectLanguage)' != 'C++/CX' And '%(ClCompile.CompileAsWinRT)' == ''">false</CompileAsWinRT>
|
||||
|
|
|
@ -23,7 +23,13 @@ Copyright (C) Microsoft Corporation. All rights reserved.
|
|||
<XamlNamespace Condition="'$(XamlNamespace)' == ''">Windows.UI.Xaml</XamlNamespace>
|
||||
<XamlMetaDataProviderIdl Condition="'$(XamlMetaDataProviderIdl)'== ''">$(GeneratedFilesDir)XamlMetaDataProvider.idl</XamlMetaDataProviderIdl>
|
||||
<XamlMetaDataProviderCpp Condition="'$(XamlMetaDataProviderCpp)'== ''">$(GeneratedFilesDir)XamlMetaDataProvider.cpp</XamlMetaDataProviderCpp>
|
||||
|
||||
<!-- For CX projects, turn off the component projection generation-->
|
||||
<CppWinRTEnableComponentProjection Condition="'$(CppWinRTEnableComponentProjection)' == '' AND '$(CppWinRTProjectLanguage)' == 'C++/CX' ">false</CppWinRTEnableComponentProjection>
|
||||
<CppWinRTEnableComponentProjection Condition="'$(CppWinRTEnableComponentProjection)' == '' AND '$(XamlLanguage)' == 'C++' ">false</CppWinRTEnableComponentProjection>
|
||||
<CppWinRTEnableComponentProjection Condition="'$(CppWinRTEnableComponentProjection)' == ''">true</CppWinRTEnableComponentProjection>
|
||||
<CppWinRTEnablePlatformProjection Condition="'$(CppWinRTEnablePlatformProjection)' == ''">true</CppWinRTEnablePlatformProjection>
|
||||
<CppWinRTEnableReferenceProjection Condition="'$(CppWinRTEnableReferenceProjection)' == ''">true</CppWinRTEnableReferenceProjection>
|
||||
|
||||
<GeneratedFilesDir Condition="'$(GeneratedFilesDir)' == ''">$(IntDir)Generated Files\</GeneratedFilesDir>
|
||||
<!--Override SDK's uap.props setting to ensure version-matched headers-->
|
||||
<CppWinRT_IncludePath>$(GeneratedFilesDir)</CppWinRT_IncludePath>
|
||||
|
@ -31,10 +37,10 @@ Copyright (C) Microsoft Corporation. All rights reserved.
|
|||
<WindowsSDK_MetadataFoundationPath Condition="('$(WindowsSDK_MetadataFoundationPath)'!='') And !Exists($(WindowsSDK_MetadataFoundationPath))">$(WindowsSDK_MetadataPathVersioned)</WindowsSDK_MetadataFoundationPath>
|
||||
|
||||
<GetTargetPathDependsOn>
|
||||
$(GetTargetPathDependsOn);CppWinRTCalculateEnabledProjections;CppWinRTGetTargetPath
|
||||
$(GetTargetPathDependsOn);GetCppWinRTMdMergeInputs;CppWinRTResolveWinMD;
|
||||
</GetTargetPathDependsOn>
|
||||
<PrepareForBuildDependsOn>
|
||||
$(PrepareForBuildDependsOn);CppWinRTVerifyKitVersion
|
||||
$(PrepareForBuildDependsOn);CppWinRTVerifyKitVersion;
|
||||
</PrepareForBuildDependsOn>
|
||||
<!-- Note: Before* targets run before Compute* targets. -->
|
||||
<BeforeMidlCompileTargets>
|
||||
|
@ -44,10 +50,10 @@ Copyright (C) Microsoft Corporation. All rights reserved.
|
|||
$(ComputeMidlInputsTargets);CppWinRTComputeXamlGeneratedMidlInputs;CppWinRTSetMidlReferences;
|
||||
</ComputeMidlInputsTargets>
|
||||
<AfterMidlTargets>
|
||||
$(AfterMidlTargets);CppWinRTMergeProjectWinMDInputs
|
||||
$(AfterMidlTargets);GetCppWinRTMdMergeInputs;CppWinRTMergeProjectWinMDInputs;CppWinRTResolveWinMD;
|
||||
</AfterMidlTargets>
|
||||
<ResolveAssemblyReferencesDependsOn>
|
||||
$(ResolveAssemblyReferencesDependsOn);GetCppWinRTProjectWinMDReferences;CppWinRTRemoveStaticLibraries
|
||||
$(ResolveAssemblyReferencesDependsOn);GetCppWinRTProjectWinMDReferences;CppWinRTRemoveStaticLibraries;
|
||||
</ResolveAssemblyReferencesDependsOn>
|
||||
<!-- Note: Before* targets run before Compute* targets. -->
|
||||
<BeforeClCompileTargets>
|
||||
|
@ -71,6 +77,11 @@ Copyright (C) Microsoft Corporation. All rights reserved.
|
|||
|
||||
</PropertyGroup>
|
||||
|
||||
<!-- For a static library we don't want the winmd/lib/pdb to be packaged -->
|
||||
<PropertyGroup Condition="'$(ConfigurationType)' == 'StaticLibrary'">
|
||||
<IncludeCopyWinMDArtifactsOutputGroup>false</IncludeCopyWinMDArtifactsOutputGroup>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="CppWinRTVerifyKitVersion" Condition="'$(CppWinRTOverrideSDKReferences)' != 'true'">
|
||||
<PropertyGroup>
|
||||
<_CppWinRT_RS4OrGreater>false</_CppWinRT_RS4OrGreater>
|
||||
|
@ -94,41 +105,19 @@ Copyright (C) Microsoft Corporation. All rights reserved.
|
|||
</Target>
|
||||
|
||||
<Target Name="CppWinRTHeapEnforcementOptOut" Condition="'@(ClCompile)' != ''">
|
||||
<ItemGroup Condition="'$(CppWinRTHeapEnforcement)'=='' and ('@(Page)' != '' Or '@(ApplicationDefinition)' != '')">
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(ClCompile.AdditionalOptions) /DWINRT_NO_MAKE_DETECTION</AdditionalOptions>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup Condition="'$(CppWinRTHeapEnforcement)'=='' and ('@(Page)' != '' Or '@(ApplicationDefinition)' != '')">
|
||||
<ClCompile>
|
||||
<AdditionalOptions>%(ClCompile.AdditionalOptions) /DWINRT_NO_MAKE_DETECTION</AdditionalOptions>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
<Target Name="CppWinRTCalculateEnabledProjections"
|
||||
DependsOnTargets="GetCppWinRTProjectWinMDReferences;GetCppWinRTMdMergeInputs;$(CppWinRTCalculateEnabledProjectionsDependsOn)"
|
||||
BeforeTargets="CppWinRTGetTargetPath;CppWinRTMakePlatformProjection;CppWinRTMakeComponentProjection;CppWinRTMakeReferenceProjection"
|
||||
Returns="$(CppWinRTEnableComponentProjection);$(CppWinRTEnablePlatformProjection);$(CppWinRTEnableReferenceProjection)">
|
||||
<PropertyGroup>
|
||||
<!-- For CX projects, turn off the component projection generation-->
|
||||
<CppWinRTEnableComponentProjection Condition="'$(CppWinRTEnableComponentProjection)' == '' AND '$(CppWinRTProjectLanguage)' == 'C++/CX' ">false</CppWinRTEnableComponentProjection>
|
||||
<CppWinRTEnableComponentProjection Condition="'$(CppWinRTEnableComponentProjection)' == '' AND '$(XamlLanguage)' == 'C++' ">false</CppWinRTEnableComponentProjection>
|
||||
<!-- Turn on component projection if not turned off and:
|
||||
1. @(Midl) is not empty or
|
||||
2. project has static library references
|
||||
-->
|
||||
<CppWinRTEnableComponentProjection Condition="'$(CppWinRTEnableComponentProjection)' == '' AND '@(Midl)' != ''">true</CppWinRTEnableComponentProjection>
|
||||
<CppWinRTEnableComponentProjection Condition="'$(CppWinRTEnableComponentProjection)' == '' AND '@(CppWinRTMdMergeInputs)' != ''">true</CppWinRTEnableComponentProjection>
|
||||
<CppWinRTEnablePlatformProjection Condition="'$(CppWinRTEnablePlatformProjection)' == ''">true</CppWinRTEnablePlatformProjection>
|
||||
<CppWinRTEnableReferenceProjection Condition="'$(CppWinRTEnableReferenceProjection)' == ''">true</CppWinRTEnableReferenceProjection>
|
||||
</PropertyGroup>
|
||||
<Message Text="CppWinRTEnableComponentProjection: $(CppWinRTEnableComponentProjection)" Importance="$(CppWinRTVerbosity)"/>
|
||||
<Message Text="CppWinRTEnablePlatformProjection: $(CppWinRTEnablePlatformProjection)" Importance="$(CppWinRTVerbosity)"/>
|
||||
<Message Text="CppWinRTEnableReferenceProjection: $(CppWinRTEnableReferenceProjection)" Importance="$(CppWinRTVerbosity)"/>
|
||||
</Target>
|
||||
|
||||
<Target Name="CppWinRTGetTargetPath"
|
||||
Condition="'$(CppWinRTEnableComponentProjection)' == 'true'"
|
||||
Returns="@(TargetPathWithTargetPlatformMoniker)">
|
||||
<Target Name="CppWinRTResolveWinMD"
|
||||
Condition="'@(CppWinRTMdMergeInputs)' != '' AND '$(CppWinRTEnableComponentProjection)' == 'true'"
|
||||
Returns="@(WinMDFullPath)">
|
||||
<ItemGroup>
|
||||
<TargetPathWithTargetPlatformMoniker Remove="$(TargetPathWithTargetPlatformMoniker)"/>
|
||||
<TargetPathWithTargetPlatformMoniker Include="$(CppWinRTProjectWinMD)">
|
||||
<WinMDFullPath Remove="@(WinMDFullPath)"/>
|
||||
<WinMDFullPath Include="$(CppWinRTProjectWinMD)">
|
||||
<TargetPath>$([System.IO.Path]::GetFileName('$(CppWinRTProjectWinMD)'))</TargetPath>
|
||||
<Primary>true</Primary>
|
||||
<Implementation Condition="'$(TargetExt)' == '.dll'">$(WinMDImplementationPath)$(RootNamespace)$(TargetExt)</Implementation>
|
||||
|
@ -136,9 +125,9 @@ Copyright (C) Microsoft Corporation. All rights reserved.
|
|||
<WinMDFile>true</WinMDFile>
|
||||
<ProjectName>$(MSBuildProjectName)</ProjectName>
|
||||
<ProjectType>$(ConfigurationType)</ProjectType>
|
||||
</TargetPathWithTargetPlatformMoniker>
|
||||
</WinMDFullPath>
|
||||
</ItemGroup>
|
||||
<Message Text="CppWinRTGetTargetPath: @(TargetPathWithTargetPlatformMoniker->'%(FullPath)')" Importance="$(CppWinRTVerbosity)"/>
|
||||
<Message Text="CppWinRTResolveWinMD: @(WinMDFullPath->'%(FullPath)')" Importance="$(CppWinRTVerbosity)"/>
|
||||
</Target>
|
||||
|
||||
<!-- Static library reference files are merged into the project that
|
||||
|
@ -158,11 +147,11 @@ Copyright (C) Microsoft Corporation. All rights reserved.
|
|||
DependsOnTargets="ResolveAssemblyReferences"
|
||||
Returns="@(CppWinRTPlatformWinMDInputs)">
|
||||
<ItemGroup>
|
||||
<_CppWinRTPlatformWinMDInputs Remove="@(_CppWinRTPlatformWinMDInputs)" />
|
||||
<_CppWinRTPlatformWinMDInputs Include="$(WindowsSDK_MetadataPathVersioned)\**\*.winmd" />
|
||||
<CppWinRTPlatformWinMDInputs Include="@(_CppWinRTPlatformWinMDInputs)">
|
||||
<WinMDPath>%(FullPath)</WinMDPath>
|
||||
</CppWinRTPlatformWinMDInputs>
|
||||
<_CppWinRTPlatformWinMDInputs Remove="@(_CppWinRTPlatformWinMDInputs)" />
|
||||
<_CppWinRTPlatformWinMDInputs Include="$(WindowsSDK_MetadataPathVersioned)\**\*.winmd" />
|
||||
<CppWinRTPlatformWinMDInputs Include="@(_CppWinRTPlatformWinMDInputs)">
|
||||
<WinMDPath>%(FullPath)</WinMDPath>
|
||||
</CppWinRTPlatformWinMDInputs>
|
||||
</ItemGroup>
|
||||
<Message Text="CppWinRTPlatformWinMDInputs: @(CppWinRTPlatformWinMDInputs->'%(WinMDPath)')" Importance="$(CppWinRTVerbosity)"/>
|
||||
</Target>
|
||||
|
@ -232,7 +221,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
|
|||
|
||||
<!-- Calculates the input files and metadata directories to be passed to MdMerge -->
|
||||
<Target Name="GetCppWinRTMdMergeInputs"
|
||||
DependsOnTargets="GetCppWinRTPlatformWinMDReferences;GetCppWinRTDirectWinMDReferences;GetCppWinRTProjectWinMDReferences;"
|
||||
DependsOnTargets="CppWinRTComputeXamlGeneratedMidlInputs;GetCppWinRTPlatformWinMDReferences;GetCppWinRTDirectWinMDReferences;GetCppWinRTProjectWinMDReferences;"
|
||||
Returns="@(CppWinRTMdMergeMetadataDirectories);@(CppWinRTMdMergeInputs)">
|
||||
<ItemGroup>
|
||||
<_MdMergeInputs Remove="@(_MdMergeInputs)"/>
|
||||
|
@ -266,7 +255,7 @@ Copyright (C) Microsoft Corporation. All rights reserved.
|
|||
<_DisableReferences>false</_DisableReferences>
|
||||
<_DisableReferences Condition="('$(CppWinRTOverrideSDKReferences)' != 'true') and ('$(TargetPlatformVersion)' < '10.0.18310.0')">true</_DisableReferences>
|
||||
</PropertyGroup>
|
||||
|
||||
|
||||
<ItemGroup>
|
||||
<Midl Remove="$(XamlMetaDataProviderIdl)" />
|
||||
<Midl Include="$(XamlMetaDataProviderIdl)">
|
||||
|
@ -359,17 +348,17 @@ $(XamlMetaDataProviderPch)
|
|||
<AdditionalMetadataDirectories Condition="'$(WindowsSDK_MetadataFoundationPath)' == ''">%(Midl.AdditionalMetadataDirectories);$(WindowsSDK_MetadataPath);</AdditionalMetadataDirectories>
|
||||
</Midl>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<_MidlrtParameters>@(_MidlReferencesDistinct->'/reference "%(WinMDPath)"','
')</_MidlrtParameters>
|
||||
</PropertyGroup>
|
||||
<WriteLinesToFile Condition="!$(CppWinRTWriteOnlyWhenDifferent)"
|
||||
File="$(IntDir)midlrt.rsp" Lines="$(_MidlrtParameters)"
|
||||
ContinueOnError="true" Overwrite="true" />
|
||||
<WriteLinesToFile Condition="$(CppWinRTWriteOnlyWhenDifferent)"
|
||||
File="$(IntDir)midlrt.rsp" Lines="$(_MidlrtParameters)"
|
||||
ContinueOnError="true" Overwrite="true"
|
||||
WriteOnlyWhenDifferent="true" />
|
||||
<Message Text="CppWinRTMidlReferences: @(_MidlReferences->'%(WinMDPath)')" Importance="$(CppWinRTVerbosity)"/>
|
||||
<PropertyGroup>
|
||||
<_MidlrtParameters>@(_MidlReferencesDistinct->'/reference "%(WinMDPath)"','
')</_MidlrtParameters>
|
||||
</PropertyGroup>
|
||||
<WriteLinesToFile Condition="!$(CppWinRTWriteOnlyWhenDifferent)"
|
||||
File="$(IntDir)midlrt.rsp" Lines="$(_MidlrtParameters)"
|
||||
ContinueOnError="true" Overwrite="true" />
|
||||
<WriteLinesToFile Condition="$(CppWinRTWriteOnlyWhenDifferent)"
|
||||
File="$(IntDir)midlrt.rsp" Lines="$(_MidlrtParameters)"
|
||||
ContinueOnError="true" Overwrite="true"
|
||||
WriteOnlyWhenDifferent="true" />
|
||||
<Message Text="CppWinRTMidlReferences: @(_MidlReferences->'%(WinMDPath)')" Importance="$(CppWinRTVerbosity)"/>
|
||||
</Target>
|
||||
|
||||
<!--Merge project-generated WinMDs and project-referenced static library WinMDs into project WinMD-->
|
||||
|
@ -417,7 +406,7 @@ $(XamlMetaDataProviderPch)
|
|||
Condition="'$(CppWinRTEnablePlatformProjection)' == 'true' AND '$(CppWinRTOverrideSDKReferences)' != 'true'"
|
||||
DependsOnTargets="GetCppWinRTPlatformWinMDInputs;$(CppWinRTMakePlatformProjectionDependsOn)"
|
||||
Inputs="@(CppWinRTPlatformWinMDInputs)"
|
||||
Outputs="$(GeneratedFilesDir)winrt\base.h">
|
||||
Outputs="$(IntDir)cppwinrt_plat.rsp">
|
||||
<PropertyGroup>
|
||||
<CppWinRTCommand>$(CppWinRTPath)cppwinrt %40"$(IntDir)cppwinrt_plat.rsp"</CppWinRTCommand>
|
||||
</PropertyGroup>
|
||||
|
@ -441,45 +430,45 @@ $(XamlMetaDataProviderPch)
|
|||
<Exec Command="$(CppWinRTCommand)" />
|
||||
</Target>
|
||||
|
||||
<!--Build reference projection from WinMD project references and dynamic library project references-->
|
||||
<Target Name="CppWinRTMakeReferenceProjection"
|
||||
Condition="'$(CppWinRTEnableReferenceProjection)' == 'true'"
|
||||
DependsOnTargets="GetCppWinRTProjectWinMDReferences;GetCppWinRTPlatformWinMDReferences;GetCppWinRTDirectWinMDReferences;$(CppWinRTMakeReferenceProjectionDependsOn)"
|
||||
Inputs="@(CppWinRTDirectWinMDReferences);@(CppWinRTDynamicProjectWinMDReferences);@(CppWinRTPlatformWinMDReferences)"
|
||||
Outputs="@(CppWinRTDirectWinMDReferences->'$(GeneratedFilesDir)winrt\%(Filename).h');@(CppWinRTDynamicProjectWinMDReferences->'$(GeneratedFilesDir)winrt\%(Filename).h')">
|
||||
<PropertyGroup>
|
||||
<CppWinRTCommand>$(CppWinRTPath)cppwinrt %40"$(IntDir)cppwinrt_ref.rsp"</CppWinRTCommand>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<_CppwinrtRefInputs Remove="@(_CppwinrtRefInputs)"/>
|
||||
<_CppwinrtRefInputs Include="@(CppWinRTDirectWinMDReferences)"/>
|
||||
<_CppwinrtRefInputs Include="@(CppWinRTDynamicProjectWinMDReferences)"/>
|
||||
<_CppwinrtRefRefs Remove="@(_CppwinrtRefRefs)"/>
|
||||
<_CppwinrtRefRefs Include="@(CppWinRTPlatformWinMDReferences)"/>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<_CppwinrtParameters>$(CppWinRTCommandVerbosity) $(CppWinRTParameters)</_CppwinrtParameters>
|
||||
<_CppwinrtParameters>$(_CppwinrtParameters) @(_CppwinrtRefInputs->'-in "%(WinMDPath)"', '
')</_CppwinrtParameters>
|
||||
<_CppwinrtParameters>$(_CppwinrtParameters) @(_CppwinrtRefRefs->'-ref "%(WinMDPath)"', '
')</_CppwinrtParameters>
|
||||
<_CppwinrtParameters>$(_CppwinrtParameters) -out "$(GeneratedFilesDir)."</_CppwinrtParameters>
|
||||
</PropertyGroup>
|
||||
<WriteLinesToFile Condition="!$(CppWinRTWriteOnlyWhenDifferent)"
|
||||
File="$(IntDir)cppwinrt_ref.rsp" Lines="$(_CppwinrtParameters)"
|
||||
ContinueOnError="true" Overwrite="true" />
|
||||
<WriteLinesToFile Condition="$(CppWinRTWriteOnlyWhenDifferent)"
|
||||
File="$(IntDir)cppwinrt_ref.rsp" Lines="$(_CppwinrtParameters)"
|
||||
ContinueOnError="true" Overwrite="true"
|
||||
WriteOnlyWhenDifferent="true" />
|
||||
<Message Text="$(CppWinRTCommand)" Importance="$(CppWinRTVerbosity)"/>
|
||||
<Exec Command="$(CppWinRTCommand)" />
|
||||
</Target>
|
||||
<!--Build reference projection from WinMD project references and dynamic library project references-->
|
||||
<Target Name="CppWinRTMakeReferenceProjection"
|
||||
Condition="'$(CppWinRTEnableReferenceProjection)' == 'true'"
|
||||
DependsOnTargets="GetCppWinRTProjectWinMDReferences;GetCppWinRTPlatformWinMDReferences;GetCppWinRTDirectWinMDReferences;$(CppWinRTMakeReferenceProjectionDependsOn)"
|
||||
Inputs="@(CppWinRTDirectWinMDReferences);@(CppWinRTDynamicProjectWinMDReferences);@(CppWinRTPlatformWinMDReferences)"
|
||||
Outputs="$(IntDir)cppwinrt_ref.rsp">
|
||||
<PropertyGroup>
|
||||
<CppWinRTCommand>$(CppWinRTPath)cppwinrt %40"$(IntDir)cppwinrt_ref.rsp"</CppWinRTCommand>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<_CppwinrtRefInputs Remove="@(_CppwinrtRefInputs)"/>
|
||||
<_CppwinrtRefInputs Include="@(CppWinRTDirectWinMDReferences)"/>
|
||||
<_CppwinrtRefInputs Include="@(CppWinRTDynamicProjectWinMDReferences)"/>
|
||||
<_CppwinrtRefRefs Remove="@(_CppwinrtRefRefs)"/>
|
||||
<_CppwinrtRefRefs Include="@(CppWinRTPlatformWinMDReferences)"/>
|
||||
</ItemGroup>
|
||||
<PropertyGroup>
|
||||
<_CppwinrtParameters>$(CppWinRTCommandVerbosity) $(CppWinRTParameters)</_CppwinrtParameters>
|
||||
<_CppwinrtParameters>$(_CppwinrtParameters) @(_CppwinrtRefInputs->'-in "%(WinMDPath)"', '
')</_CppwinrtParameters>
|
||||
<_CppwinrtParameters>$(_CppwinrtParameters) @(_CppwinrtRefRefs->'-ref "%(WinMDPath)"', '
')</_CppwinrtParameters>
|
||||
<_CppwinrtParameters>$(_CppwinrtParameters) -out "$(GeneratedFilesDir)."</_CppwinrtParameters>
|
||||
</PropertyGroup>
|
||||
<WriteLinesToFile Condition="!$(CppWinRTWriteOnlyWhenDifferent)"
|
||||
File="$(IntDir)cppwinrt_ref.rsp" Lines="$(_CppwinrtParameters)"
|
||||
ContinueOnError="true" Overwrite="true" />
|
||||
<WriteLinesToFile Condition="$(CppWinRTWriteOnlyWhenDifferent)"
|
||||
File="$(IntDir)cppwinrt_ref.rsp" Lines="$(_CppwinrtParameters)"
|
||||
ContinueOnError="true" Overwrite="true"
|
||||
WriteOnlyWhenDifferent="true" />
|
||||
<Message Text="$(CppWinRTCommand)" Importance="$(CppWinRTVerbosity)"/>
|
||||
<Exec Command="$(CppWinRTCommand)" />
|
||||
</Target>
|
||||
|
||||
<!--Build component projection from project WinMD file and static library project references-->
|
||||
<Target Name="CppWinRTMakeComponentProjection"
|
||||
Condition="'$(CppWinRTEnableComponentProjection)' == 'true'"
|
||||
DependsOnTargets="GetCppWinRTProjectWinMDReferences;GetCppWinRTPlatformWinMDReferences;GetCppWinRTDirectWinMDReferences;$(CppWinRTMakeComponentProjectionDependsOn)"
|
||||
Inputs="@(Midl->'%(MetadataFileName)');@(CppWinRTStaticProjectWinMDReferences)"
|
||||
Outputs="$(GeneratedFilesDir)winrt\$(RootNamespace).h">
|
||||
DependsOnTargets="GetCppWinRTProjectWinMDReferences;GetCppWinRTPlatformWinMDReferences;GetCppWinRTDirectWinMDReferences;GetCppWinRTMdMergeInputs;$(CppWinRTMakeComponentProjectionDependsOn)"
|
||||
Inputs="@(CppWinRTMdMergeInputs);@(CppWinRTStaticProjectWinMDReferences)"
|
||||
Outputs="$(IntDir)cppwinrt_comp.rsp">
|
||||
<PropertyGroup>
|
||||
<_PCH>@(ClCompile->Metadata('PrecompiledHeaderFile')->Distinct())</_PCH>
|
||||
</PropertyGroup>
|
||||
|
@ -531,7 +520,6 @@ $(XamlMetaDataProviderPch)
|
|||
<Exec Command="$(CppWinRTCommand)" Condition="'@(_CppwinrtCompInputs)' != ''"/>
|
||||
</Target>
|
||||
|
||||
<!-- Main target that generates all the CppWinRT projections. -->
|
||||
<Target Name="CppWinRTMakeProjections" DependsOnTargets="CppWinRTCalculateEnabledProjections;CppWinRTMakePlatformProjection;CppWinRTMakeReferenceProjection;CppWinRTMakeComponentProjection;$(CppWinRTMakeProjectionsDependsOn)" />
|
||||
|
||||
<!--Add references to all merged project WinMD files for Xaml Compiler-->
|
||||
|
@ -542,7 +530,7 @@ $(XamlMetaDataProviderPch)
|
|||
<XamlReferencesToCompile Include="$(OutDir)*.winmd" />
|
||||
</ItemGroup>
|
||||
</Target>
|
||||
|
||||
|
||||
<!--Clear merged assembly and set local assembly for Xaml Compiler.
|
||||
(Note: this can be removed when CppWinRT references are removed from the Xaml targets file.)-->
|
||||
<Target Name="CppWinRTSetXamlLocalAssembly"
|
||||
|
|
|
@ -17,8 +17,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
|
|||
ProjectSection(SolutionItems) = preProject
|
||||
Directory.Build.props = Directory.Build.props
|
||||
Directory.Build.targets = Directory.Build.targets
|
||||
..\..\..\..\package\cppwinrt\nuget\Microsoft.Windows.CppWinRT.props = ..\..\..\..\package\cppwinrt\nuget\Microsoft.Windows.CppWinRT.props
|
||||
..\..\..\..\package\cppwinrt\nuget\Microsoft.Windows.CppWinRT.targets = ..\..\..\..\package\cppwinrt\nuget\Microsoft.Windows.CppWinRT.targets
|
||||
..\..\nuget\Microsoft.Windows.CppWinRT.props = ..\..\nuget\Microsoft.Windows.CppWinRT.props
|
||||
..\..\nuget\Microsoft.Windows.CppWinRT.targets = ..\..\nuget\Microsoft.Windows.CppWinRT.targets
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestRuntimeComponent3", "TestRuntimeComponent3\TestRuntimeComponent3.vcxproj", "{C2820B98-A31F-46D0-A96D-B8F24392B049}"
|
||||
|
|
|
@ -13,6 +13,7 @@ bool __stdcall winrt_can_unload_now() noexcept
|
|||
}
|
||||
|
||||
void* __stdcall TestStaticLibrary5_get_activation_factory(std::wstring_view const& name);
|
||||
void* __stdcall TestStaticLibrary6_get_activation_factory(std::wstring_view const& name);
|
||||
|
||||
void* __stdcall winrt_get_activation_factory(std::wstring_view const& name)
|
||||
{
|
||||
|
@ -21,6 +22,11 @@ void* __stdcall winrt_get_activation_factory(std::wstring_view const& name)
|
|||
{
|
||||
return factory;
|
||||
}
|
||||
factory = TestStaticLibrary6_get_activation_factory(name);
|
||||
if (factory)
|
||||
{
|
||||
return factory;
|
||||
}
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче