-
Notifications
You must be signed in to change notification settings - Fork 323
Expand file tree
/
Copy pathMicrosoft.Test.Pict.targets
More file actions
66 lines (62 loc) · 3.47 KB
/
Copy pathMicrosoft.Test.Pict.targets
File metadata and controls
66 lines (62 loc) · 3.47 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
57
58
59
60
61
62
63
64
65
66
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemDefinitionGroup>
<ClCompile>
<AdditionalIncludeDirectories>$(MSBuildThisFileDirectory)..\contents\api;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
</ClCompile>
<Link>
<!-- Link the PICT API library -->
<AdditionalDependencies>pict.lib;%(AdditionalDependencies)</AdditionalDependencies>
</Link>
</ItemDefinitionGroup>
<!-- Map the build platform to the packaged architecture folder. -->
<PropertyGroup>
<PictApiPlatformDir Condition="'$(Platform)' == 'Win32'">win-x86</PictApiPlatformDir>
<PictApiPlatformDir Condition="'$(Platform)' == 'x86'">win-x86</PictApiPlatformDir>
<PictApiPlatformDir Condition="'$(Platform)' == 'x64'">win-x64</PictApiPlatformDir>
<PictApiPlatformDir Condition="'$(Platform)' == 'ARM64'">win-arm64</PictApiPlatformDir>
<!-- A Debug consumer links the Debug lib, otherwise the Release lib. -->
<PictApiConfiguration Condition="'$(PictApiConfiguration)' == '' and '$(Configuration)' == 'Debug'">Debug</PictApiConfiguration>
<PictApiConfiguration Condition="'$(PictApiConfiguration)' == ''">Release</PictApiConfiguration>
</PropertyGroup>
<!--
Select the pict.lib variant whose CRT linkage matches the consumer, and add its
directory to the linker search path. Detection is based on the consumer's
RuntimeLibrary; it can be forced by setting PictApiRuntime to 'static' or 'dynamic'.
Defaults to 'dynamic' (the /MD Visual Studio default). The dynamic variant lives at
api\<Config>; the static (/MT) variant lives at api\static\<Config>.
-->
<Target Name="PictResolveApiLibrary" BeforeTargets="Link">
<PropertyGroup>
<_PictConsumerRuntimeLibrary>@(ClCompile->'%(RuntimeLibrary)')</_PictConsumerRuntimeLibrary>
<PictApiRuntime Condition="'$(PictApiRuntime)' == '' and $(_PictConsumerRuntimeLibrary.Contains('MultiThreaded')) and !$(_PictConsumerRuntimeLibrary.Contains('DLL'))">static</PictApiRuntime>
<PictApiRuntime Condition="'$(PictApiRuntime)' == ''">dynamic</PictApiRuntime>
<_PictApiRuntimeSubDir Condition="'$(PictApiRuntime)' == 'static'">static\</_PictApiRuntimeSubDir>
<PictApiLibraryDir>$(MSBuildThisFileDirectory)..\contents\$(PictApiPlatformDir)\api\$(_PictApiRuntimeSubDir)$(PictApiConfiguration)</PictApiLibraryDir>
</PropertyGroup>
<ItemGroup>
<Link>
<AdditionalLibraryDirectories>$(PictApiLibraryDir);%(Link.AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
</Link>
</ItemGroup>
</Target>
<!-- Copy DLLs to output directory -->
<ItemGroup Condition="'$(Platform)' == 'Win32' or '$(Platform)' == 'x86'">
<Content Include="$(MSBuildThisFileDirectory)..\contents\win-x86\dll\*.dll">
<Link>%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup Condition="'$(Platform)' == 'x64'">
<Content Include="$(MSBuildThisFileDirectory)..\contents\win-x64\dll\*.dll">
<Link>%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup Condition="'$(Platform)' == 'ARM64'">
<Content Include="$(MSBuildThisFileDirectory)..\contents\win-arm64\dll\*.dll">
<Link>%(Filename)%(Extension)</Link>
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
</Project>