progman
142 строки · 5.6 Кб
1<!--
2*
3* System.Data.SQLite.Core.targets -
4*
5* WARNING: This MSBuild file requires MSBuild 4.0 features.
6*
7* Written by Joe Mistachkin and David Archer.
8* Released to the public domain, use at your own risk!
9*
10-->
11<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">12<!--13******************************************************************************
14** Load Per-User Settings **
15******************************************************************************
16-->
17
18<!--19NOTE: If the per-user settings file exists, import it now. The contained
20settings, if any, will override the default ones provided below.
21-->
22<Import Condition="'$(MSBuildThisFileDirectory)' != '' And23HasTrailingSlash('$(MSBuildThisFileDirectory)') And
24Exists('$(MSBuildThisFileDirectory)System.Data.SQLite.Core.targets.user')"25Project="$(MSBuildThisFileDirectory)System.Data.SQLite.Core.targets.user" />26
27<!--28******************************************************************************
29** SQLite Interop Library Build Items **
30******************************************************************************
31-->
32
33<ItemGroup>34<SQLiteInteropFiles Condition="'$(MSBuildThisFileDirectory)' != '' And35HasTrailingSlash('$(MSBuildThisFileDirectory)')"36Include="$(MSBuildThisFileDirectory)**\SQLite.Interop.*" />37</ItemGroup>38
39<!--40******************************************************************************
41** SQLite Interop Library Content Items **
42******************************************************************************
43-->
44
45<ItemGroup Condition="'$(ContentSQLiteInteropFiles)' != '' And46'$(ContentSQLiteInteropFiles)' != 'false' And
47'@(SQLiteInteropFiles)' != ''">48<Content Include="@(SQLiteInteropFiles)">49<Link>%(RecursiveDir)%(FileName)%(Extension)</Link>50<CopyToOutputDirectory>Always</CopyToOutputDirectory>51</Content>52</ItemGroup>53
54<!--55******************************************************************************
56** SQLite Interop Library Build Targets **
57******************************************************************************
58-->
59
60<Target Name="CopySQLiteInteropFiles"61Condition="'$(CopySQLiteInteropFiles)' != 'false' And62'$(OutDir)' != '' And
63HasTrailingSlash('$(OutDir)') And
64Exists('$(OutDir)')"65Inputs="@(SQLiteInteropFiles)"66Outputs="@(SQLiteInteropFiles -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')">67<!--68NOTE: Copy "SQLite.Interop.dll" and all related files, for every
69architecture that we support, to the build output directory.
70-->
71<Copy SourceFiles="@(SQLiteInteropFiles)"72DestinationFiles="@(SQLiteInteropFiles -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')" />73</Target>74
75<!--76******************************************************************************
77-->
78
79<Target Name="CleanSQLiteInteropFiles"80Condition="'$(CleanSQLiteInteropFiles)' != 'false' And81'$(OutDir)' != '' And
82HasTrailingSlash('$(OutDir)') And
83Exists('$(OutDir)')">84<!--85NOTE: Delete "SQLite.Interop.dll" and all related files, for every
86architecture that we support, from the build output directory.
87-->
88<Delete Files="@(SQLiteInteropFiles -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')" />89</Target>90
91<!--92******************************************************************************
93-->
94
95<Target Name="CollectSQLiteInteropFiles"96Condition="'$(CollectSQLiteInteropFiles)' != 'false'">97<ItemGroup>98<FilesForPackagingFromProject Include="@(SQLiteInteropFiles)">99<DestinationRelativePath>bin\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>100</FilesForPackagingFromProject>101</ItemGroup>102</Target>103
104<!--105******************************************************************************
106** SQLite Interop Library Build Properties **
107******************************************************************************
108-->
109
110<PropertyGroup>111<PostBuildEventDependsOn>112$(PostBuildEventDependsOn);
113CopySQLiteInteropFiles;
114</PostBuildEventDependsOn>115<BuildDependsOn>116$(BuildDependsOn);
117CopySQLiteInteropFiles;
118</BuildDependsOn>119<CleanDependsOn>120$(CleanDependsOn);
121CleanSQLiteInteropFiles;
122</CleanDependsOn>123</PropertyGroup>124
125<!--126******************************************************************************
127** SQLite Interop Library Publish Properties for Visual Studio 201x **
128******************************************************************************
129-->
130
131<PropertyGroup Condition="'$(VisualStudioVersion)' == '' Or132'$(VisualStudioVersion)' == '10.0' Or
133'$(VisualStudioVersion)' == '11.0' Or
134'$(VisualStudioVersion)' == '12.0' Or
135'$(VisualStudioVersion)' == '14.0' Or
136'$(VisualStudioVersion)' == '15.0'">137<PipelineCollectFilesPhaseDependsOn>138CollectSQLiteInteropFiles;
139$(PipelineCollectFilesPhaseDependsOn);
140</PipelineCollectFilesPhaseDependsOn>141</PropertyGroup>142</Project>143