System.Data.SQLite.Core.targets 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  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. NOTE: If the per-user settings file exists, import it now. The contained
  19. settings, if any, will override the default ones provided below.
  20. -->
  21. <Import Condition="'$(MSBuildThisFileDirectory)' != '' And
  22. HasTrailingSlash('$(MSBuildThisFileDirectory)') And
  23. Exists('$(MSBuildThisFileDirectory)System.Data.SQLite.Core.targets.user')"
  24. Project="$(MSBuildThisFileDirectory)System.Data.SQLite.Core.targets.user" />
  25. <!--
  26. ******************************************************************************
  27. ** SQLite Interop Library Build Items **
  28. ******************************************************************************
  29. -->
  30. <ItemGroup>
  31. <SQLiteInteropFiles Condition="'$(MSBuildThisFileDirectory)' != '' And
  32. HasTrailingSlash('$(MSBuildThisFileDirectory)')"
  33. Include="$(MSBuildThisFileDirectory)**\SQLite.Interop.*" />
  34. </ItemGroup>
  35. <!--
  36. ******************************************************************************
  37. ** SQLite Interop Library Content Items **
  38. ******************************************************************************
  39. -->
  40. <ItemGroup Condition="'$(ContentSQLiteInteropFiles)' != '' And
  41. '$(ContentSQLiteInteropFiles)' != 'false' And
  42. '@(SQLiteInteropFiles)' != ''">
  43. <Content Include="@(SQLiteInteropFiles)">
  44. <Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
  45. <CopyToOutputDirectory>Always</CopyToOutputDirectory>
  46. </Content>
  47. </ItemGroup>
  48. <!--
  49. ******************************************************************************
  50. ** SQLite Interop Library Build Targets **
  51. ******************************************************************************
  52. -->
  53. <Target Name="CopySQLiteInteropFiles"
  54. Condition="'$(CopySQLiteInteropFiles)' != 'false' And
  55. '$(OutDir)' != '' And
  56. HasTrailingSlash('$(OutDir)') And
  57. Exists('$(OutDir)')"
  58. Inputs="@(SQLiteInteropFiles)"
  59. Outputs="@(SQLiteInteropFiles -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')">
  60. <!--
  61. NOTE: Copy "SQLite.Interop.dll" and all related files, for every
  62. architecture that we support, to the build output directory.
  63. -->
  64. <Copy SourceFiles="@(SQLiteInteropFiles)"
  65. DestinationFiles="@(SQLiteInteropFiles -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')" />
  66. </Target>
  67. <!--
  68. ******************************************************************************
  69. -->
  70. <Target Name="CleanSQLiteInteropFiles"
  71. Condition="'$(CleanSQLiteInteropFiles)' != 'false' And
  72. '$(OutDir)' != '' And
  73. HasTrailingSlash('$(OutDir)') And
  74. Exists('$(OutDir)')">
  75. <!--
  76. NOTE: Delete "SQLite.Interop.dll" and all related files, for every
  77. architecture that we support, from the build output directory.
  78. -->
  79. <Delete Files="@(SQLiteInteropFiles -> '$(OutDir)%(RecursiveDir)%(Filename)%(Extension)')" />
  80. </Target>
  81. <!--
  82. ******************************************************************************
  83. -->
  84. <Target Name="CollectSQLiteInteropFiles"
  85. Condition="'$(CollectSQLiteInteropFiles)' != 'false'">
  86. <ItemGroup>
  87. <FilesForPackagingFromProject Include="@(SQLiteInteropFiles)">
  88. <DestinationRelativePath>bin\%(RecursiveDir)%(Filename)%(Extension)</DestinationRelativePath>
  89. </FilesForPackagingFromProject>
  90. </ItemGroup>
  91. </Target>
  92. <!--
  93. ******************************************************************************
  94. ** SQLite Interop Library Build Properties **
  95. ******************************************************************************
  96. -->
  97. <PropertyGroup>
  98. <PostBuildEventDependsOn>
  99. $(PostBuildEventDependsOn);
  100. CopySQLiteInteropFiles;
  101. </PostBuildEventDependsOn>
  102. <BuildDependsOn>
  103. $(BuildDependsOn);
  104. CopySQLiteInteropFiles;
  105. </BuildDependsOn>
  106. <CleanDependsOn>
  107. $(CleanDependsOn);
  108. CleanSQLiteInteropFiles;
  109. </CleanDependsOn>
  110. </PropertyGroup>
  111. <!--
  112. ******************************************************************************
  113. ** SQLite Interop Library Publish Properties for Visual Studio 201x **
  114. ******************************************************************************
  115. -->
  116. <PropertyGroup Condition="'$(VisualStudioVersion)' == '' Or
  117. '$(VisualStudioVersion)' == '10.0' Or
  118. '$(VisualStudioVersion)' == '11.0' Or
  119. '$(VisualStudioVersion)' == '12.0' Or
  120. '$(VisualStudioVersion)' == '14.0' Or
  121. '$(VisualStudioVersion)' == '15.0'">
  122. <PipelineCollectFilesPhaseDependsOn>
  123. CollectSQLiteInteropFiles;
  124. $(PipelineCollectFilesPhaseDependsOn);
  125. </PipelineCollectFilesPhaseDependsOn>
  126. </PropertyGroup>
  127. </Project>