Skip to content

Commit fafed3c

Browse files
committed
Merge pull request #312 from kjbartel/NugetTargets
Change Nuget targets to use 'Content' rather than 'Copy' and 'Delete'
2 parents 39cd2f2 + e98be5e commit fafed3c

File tree

3 files changed

+27
-168
lines changed

3 files changed

+27
-168
lines changed

build/MathNet.Numerics.CUDA.Win.targets

Lines changed: 9 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -8,67 +8,20 @@
88
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
99
<!--
1010
******************************************************************************
11-
** MathNet Interop Library Build Items **
11+
** MathNet Interop Library Files **
1212
******************************************************************************
1313
-->
1414

15-
<ItemGroup>
16-
<MathNetInteropFiles Condition="'$(MSBuildThisFileDirectory)' != '' And
17-
HasTrailingSlash('$(MSBuildThisFileDirectory)')"
18-
Include="$(MSBuildThisFileDirectory)**\*.dll" />
19-
</ItemGroup>
20-
21-
<!--
22-
******************************************************************************
23-
** MathNet Interop Library Build Targets **
24-
******************************************************************************
25-
-->
26-
27-
<Target Name="CopyMathNetInteropFiles"
28-
Condition="'$(CopyMathNetInteropFiles)' != 'false' And
29-
'$(OutputPath)' != '' And
30-
HasTrailingSlash('$(OutputPath)') And
31-
Exists('$(OutputPath)')"
32-
Inputs="@(MathNetInteropFiles)"
33-
Outputs="@(MathNetInteropFiles -> '$(OutputPath)%(RecursiveDir)%(Filename)%(Extension)')">
15+
<ItemGroup Condition="'$(MSBuildThisFileDirectory)' != '' And
16+
HasTrailingSlash('$(MSBuildThisFileDirectory)')">
3417
<!--
3518
NOTE: Copy "MathNet.Numerics.CUDA.dll" and all related files, for every
3619
architecture that we support, to the build output directory.
3720
-->
38-
<Copy SourceFiles="@(MathNetInteropFiles)"
39-
DestinationFiles="@(MathNetInteropFiles -> '$(OutputPath)%(RecursiveDir)%(Filename)%(Extension)')" />
40-
</Target>
41-
42-
<!--
43-
******************************************************************************
44-
-->
45-
46-
<Target Name="CleanMathNetInteropFiles"
47-
Condition="'$(CleanMathNetInteropFiles)' != 'false' And
48-
'$(OutputPath)' != '' And
49-
HasTrailingSlash('$(OutputPath)') And
50-
Exists('$(OutputPath)')">
51-
<!--
52-
NOTE: Delete "MathNet.Numerics.CUDA.dll" and all related files, for every
53-
architecture that we support, from the build output directory.
54-
-->
55-
<Delete Files="@(MathNetInteropFiles -> '$(OutputPath)%(RecursiveDir)%(Filename)%(Extension)')" />
56-
</Target>
57-
58-
<!--
59-
******************************************************************************
60-
** MathNet Interop Library Build Properties **
61-
******************************************************************************
62-
-->
63-
64-
<PropertyGroup>
65-
<BuildDependsOn>
66-
$(BuildDependsOn);
67-
CopyMathNetInteropFiles;
68-
</BuildDependsOn>
69-
<CleanDependsOn>
70-
$(CleanDependsOn);
71-
CleanMathNetInteropFiles;
72-
</CleanDependsOn>
73-
</PropertyGroup>
21+
<MathNetInteropFiles Include="$(MSBuildThisFileDirectory)**\*.dll" />
22+
<Content Include="@(MathNetInteropFiles)">
23+
<Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
24+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
25+
</Content>
26+
</ItemGroup>
7427
</Project>

build/MathNet.Numerics.MKL.Win.targets

Lines changed: 9 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -8,67 +8,20 @@
88
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
99
<!--
1010
******************************************************************************
11-
** MathNet Interop Library Build Items **
11+
** MathNet Interop Library Files **
1212
******************************************************************************
1313
-->
1414

15-
<ItemGroup>
16-
<MathNetInteropFiles Condition="'$(MSBuildThisFileDirectory)' != '' And
17-
HasTrailingSlash('$(MSBuildThisFileDirectory)')"
18-
Include="$(MSBuildThisFileDirectory)**\*.dll" />
19-
</ItemGroup>
20-
21-
<!--
22-
******************************************************************************
23-
** MathNet Interop Library Build Targets **
24-
******************************************************************************
25-
-->
26-
27-
<Target Name="CopyMathNetInteropFiles"
28-
Condition="'$(CopyMathNetInteropFiles)' != 'false' And
29-
'$(OutputPath)' != '' And
30-
HasTrailingSlash('$(OutputPath)') And
31-
Exists('$(OutputPath)')"
32-
Inputs="@(MathNetInteropFiles)"
33-
Outputs="@(MathNetInteropFiles -> '$(OutputPath)%(RecursiveDir)%(Filename)%(Extension)')">
15+
<ItemGroup Condition="'$(MSBuildThisFileDirectory)' != '' And
16+
HasTrailingSlash('$(MSBuildThisFileDirectory)')">
3417
<!--
3518
NOTE: Copy "MathNet.Numerics.MKL.dll" and all related files, for every
3619
architecture that we support, to the build output directory.
3720
-->
38-
<Copy SourceFiles="@(MathNetInteropFiles)"
39-
DestinationFiles="@(MathNetInteropFiles -> '$(OutputPath)%(RecursiveDir)%(Filename)%(Extension)')" />
40-
</Target>
41-
42-
<!--
43-
******************************************************************************
44-
-->
45-
46-
<Target Name="CleanMathNetInteropFiles"
47-
Condition="'$(CleanMathNetInteropFiles)' != 'false' And
48-
'$(OutputPath)' != '' And
49-
HasTrailingSlash('$(OutputPath)') And
50-
Exists('$(OutputPath)')">
51-
<!--
52-
NOTE: Delete "MathNet.Numerics.MKL.dll" and all related files, for every
53-
architecture that we support, from the build output directory.
54-
-->
55-
<Delete Files="@(MathNetInteropFiles -> '$(OutputPath)%(RecursiveDir)%(Filename)%(Extension)')" />
56-
</Target>
57-
58-
<!--
59-
******************************************************************************
60-
** MathNet Interop Library Build Properties **
61-
******************************************************************************
62-
-->
63-
64-
<PropertyGroup>
65-
<BuildDependsOn>
66-
$(BuildDependsOn);
67-
CopyMathNetInteropFiles;
68-
</BuildDependsOn>
69-
<CleanDependsOn>
70-
$(CleanDependsOn);
71-
CleanMathNetInteropFiles;
72-
</CleanDependsOn>
73-
</PropertyGroup>
21+
<MathNetInteropFiles Include="$(MSBuildThisFileDirectory)**\*.dll" />
22+
<Content Include="@(MathNetInteropFiles)">
23+
<Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
24+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
25+
</Content>
26+
</ItemGroup>
7427
</Project>

build/MathNet.Numerics.OpenBLAS.Win.targets

Lines changed: 9 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -8,67 +8,20 @@
88
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
99
<!--
1010
******************************************************************************
11-
** MathNet Interop Library Build Items **
11+
** MathNet Interop Library Files **
1212
******************************************************************************
1313
-->
1414

15-
<ItemGroup>
16-
<MathNetInteropFiles Condition="'$(MSBuildThisFileDirectory)' != '' And
17-
HasTrailingSlash('$(MSBuildThisFileDirectory)')"
18-
Include="$(MSBuildThisFileDirectory)**\*.dll" />
19-
</ItemGroup>
20-
21-
<!--
22-
******************************************************************************
23-
** MathNet Interop Library Build Targets **
24-
******************************************************************************
25-
-->
26-
27-
<Target Name="CopyMathNetInteropFiles"
28-
Condition="'$(CopyMathNetInteropFiles)' != 'false' And
29-
'$(OutputPath)' != '' And
30-
HasTrailingSlash('$(OutputPath)') And
31-
Exists('$(OutputPath)')"
32-
Inputs="@(MathNetInteropFiles)"
33-
Outputs="@(MathNetInteropFiles -> '$(OutputPath)%(RecursiveDir)%(Filename)%(Extension)')">
15+
<ItemGroup Condition="'$(MSBuildThisFileDirectory)' != '' And
16+
HasTrailingSlash('$(MSBuildThisFileDirectory)')">
3417
<!--
3518
NOTE: Copy "MathNet.Numerics.OpenBLAS.dll" and all related files, for every
3619
architecture that we support, to the build output directory.
3720
-->
38-
<Copy SourceFiles="@(MathNetInteropFiles)"
39-
DestinationFiles="@(MathNetInteropFiles -> '$(OutputPath)%(RecursiveDir)%(Filename)%(Extension)')" />
40-
</Target>
41-
42-
<!--
43-
******************************************************************************
44-
-->
45-
46-
<Target Name="CleanMathNetInteropFiles"
47-
Condition="'$(CleanMathNetInteropFiles)' != 'false' And
48-
'$(OutputPath)' != '' And
49-
HasTrailingSlash('$(OutputPath)') And
50-
Exists('$(OutputPath)')">
51-
<!--
52-
NOTE: Delete "MathNet.Numerics.OpenBLAS.dll" and all related files, for every
53-
architecture that we support, from the build output directory.
54-
-->
55-
<Delete Files="@(MathNetInteropFiles -> '$(OutputPath)%(RecursiveDir)%(Filename)%(Extension)')" />
56-
</Target>
57-
58-
<!--
59-
******************************************************************************
60-
** MathNet Interop Library Build Properties **
61-
******************************************************************************
62-
-->
63-
64-
<PropertyGroup>
65-
<BuildDependsOn>
66-
$(BuildDependsOn);
67-
CopyMathNetInteropFiles;
68-
</BuildDependsOn>
69-
<CleanDependsOn>
70-
$(CleanDependsOn);
71-
CleanMathNetInteropFiles;
72-
</CleanDependsOn>
73-
</PropertyGroup>
21+
<MathNetInteropFiles Include="$(MSBuildThisFileDirectory)**\*.dll" />
22+
<Content Include="@(MathNetInteropFiles)">
23+
<Link>%(RecursiveDir)%(FileName)%(Extension)</Link>
24+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
25+
</Content>
26+
</ItemGroup>
7427
</Project>

0 commit comments

Comments
 (0)