forked from dotnet/runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruntime-prereqs.proj
More file actions
42 lines (38 loc) · 2.33 KB
/
runtime-prereqs.proj
File metadata and controls
42 lines (38 loc) · 2.33 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
<Project>
<Import Project="Sdk.props" Sdk="Microsoft.Build.NoTargets" />
<PropertyGroup>
<NativeVersionFile Condition="$([MSBuild]::IsOsPlatform(Windows))">$(ArtifactsObjDir)_version.h</NativeVersionFile>
<NativeVersionFile Condition="!$([MSBuild]::IsOsPlatform(Windows)) or '$(TargetsMobile)' == 'true'">$(ArtifactsObjDir)_version.c</NativeVersionFile>
<RuntimeVersionFile>$(ArtifactsObjDir)runtime_version.h</RuntimeVersionFile>
<NativeSourceLinkFile>$(ArtifactsObjDir)native.sourcelink.json</NativeSourceLinkFile>
<VerifySourceLinkFileExists>false</VerifySourceLinkFileExists>
<VerifySourceLinkFileExists Condition="'$(ContinuousIntegrationBuild)' == 'true' AND '$(EnableSourceControlManagerQueries)' == 'true'">true</VerifySourceLinkFileExists>
<AssemblyName>.NET Runtime</AssemblyName>
</PropertyGroup>
<Import Project="$(RepositoryEngineeringDir)versioning.targets" />
<Import Project="$(RepositoryEngineeringDir)nativepgo.targets" />
<Target Name="BuildPrereqs" BeforeTargets="Build" DependsOnTargets="GenerateRuntimeVersionFile;GenerateNativeSourcelinkFile" />
<!--
This is a workaround when cross-compiling on Windows for non-windows (Mobile for now) targets.
https://github.com/dotnet/arcade/issues/15496
-->
<Target Name="_BeforeCrossTargetNativeVersionFile" BeforeTargets="GenerateNativeVersionFile" Condition="$([MSBuild]::IsOsPlatform(Windows)) and '$(TargetsMobile)' == 'true'">
<PropertyGroup>
<NativeVersionFile>$(ArtifactsObjDir)_version.h</NativeVersionFile>
</PropertyGroup>
</Target>
<Target Name="_AfterCrossTargetNativeVersionFile" AfterTargets="GenerateNativeVersionFile" Condition="$([MSBuild]::IsOsPlatform(Windows)) and '$(TargetsMobile)' == 'true'">
<PropertyGroup>
<NativeVersionFile>$(ArtifactsObjDir)_version.c</NativeVersionFile>
</PropertyGroup>
</Target>
<Import Project="Sdk.targets" Sdk="Microsoft.Build.NoTargets" />
<!--
This is relatively ugly. The NoTargets SDK sets DebugType=None, but that makes it such that the sourcelink targets
don't run, and we wouldn't generate the sourcelink file for native compilation. It would be better if we could call
the target directly and have it generate the file, but it's guarded by this property anyway...
-->
<PropertyGroup>
<DebugType>Portable</DebugType>
</PropertyGroup>
</Project>