xamarin-macios/msbuild/Xamarin.Shared/Xamarin.Shared.ObjCBinding....

60 строки
2.3 KiB
Plaintext
Исходник Обычный вид История

<!--
***********************************************************************************************
Xamarin.Shared.ObjCBinding.targets
WARNING: DO NOT MODIFY this file unless you are knowledgeable about MSBuild and have
created a backup copy. Incorrect changes to this file will make it
impossible to load or build your projects from the command-line or the IDE.
This file imports the version- and platform-specific targets for the project importing
this file. This file also defines targets to produce an error if the specified targets
file does not exist, but the project is built anyway (command-line or IDE build).
Copyright (C) 2020 Microsoft. All rights reserved.
***********************************************************************************************
-->
<!-- This file is shared between Xamarin.iOS and Xamarin.Mac, but only included for binding projects -->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- Add our own pre-build steps -->
<PropertyGroup Condition="'$(_UsingXamarinSdk)' != 'true'">
<BuildDependsOn>
BuildOnlySettings;
_CreateGeneratedSourcesDir;
_CreateEmbeddedResources;
$(BuildDependsOn)
</BuildDependsOn>
</PropertyGroup>
<!-- Add our own Clean steps -->
<PropertyGroup Condition="'$(_UsingXamarinSdk)' != 'true'">
<CleanDependsOn>
_CleanGeneratedSources;
$(CleanDependsOn)
</CleanDependsOn>
</PropertyGroup>
<!-- Create a directory to contain the generated sources -->
<Target Name="_CreateGeneratedSourcesDir">
<MakeDir Directories="$(GeneratedSourcesDir)" />
</Target>
<!-- Clean the generated sources -->
<Target Name="_CleanGeneratedSources">
<RemoveDir Directories="$(GeneratedSourcesDir)" Condition="Exists ('$(GeneratedSourcesDir)')" />
</Target>
<Target Name="_CreateEmbeddedResources" DependsOnTargets="_CollectBundleResources">
<PropertyGroup>
<_EmbeddedResourcePrefix Condition="'$(_PlatformName)' == 'macOS'">xammac</_EmbeddedResourcePrefix>
<_EmbeddedResourcePrefix Condition="'$(_PlatformName)' != 'macOS'">monotouch</_EmbeddedResourcePrefix>
</PropertyGroup>
<CreateEmbeddedResources BundleResources="@(_BundleResourceWithLogicalName)" Prefix="$(_EmbeddedResourcePrefix)">
<Output ItemName="EmbeddedResource" TaskParameter="EmbeddedResources" />
</CreateEmbeddedResources>
</Target>
</Project>