forked from xBimTeam/XbimGeometry
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Xbim.Geometry.Engine.Interop.build.targets
110 lines (101 loc) · 4.44 KB
/
Xbim.Geometry.Engine.Interop.build.targets
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!--
*
* Xbim.Geometry.Engine.targets -
*
* WARNING: This MSBuild file requires MSBuild 4.0 features.
*
* Written by Steve Lockley with thanks to Joe Mistachkin and David Archer.
* Released to the public domain, use at your own risk!
*
-->
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!--
******************************************************************************
** Xbim Geometry Interop Library Build Items **
******************************************************************************
-->
<ItemGroup Condition=" '$(Platform)' == 'x86' OR '$(Platform)' == 'AnyCPU'">
<XbimInteropFiles Condition="'$(MSBuildThisFileDirectory)' != '' And
HasTrailingSlash('$(MSBuildThisFileDirectory)')"
Include="$(MSBuildThisFileDirectory)**\Xbim.Geometry.Engine32.dll" >
<Visible>True</Visible>
<Group></Group>
<PublishState>Include</PublishState>
<TargetPath></TargetPath>
<FileType>Assembly</FileType>
</XbimInteropFiles>
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'x64' OR '$(Platform)' == 'AnyCPU'">
<XbimInteropFiles Condition="'$(MSBuildThisFileDirectory)' != '' And
HasTrailingSlash('$(MSBuildThisFileDirectory)')"
Include="$(MSBuildThisFileDirectory)**\Xbim.Geometry.Engine64.dll" >
<Visible>True</Visible>
<Group></Group>
<PublishState>Include</PublishState>
<TargetPath></TargetPath>
<FileType>Assembly</FileType>
</XbimInteropFiles>
</ItemGroup>
<!--
******************************************************************************
** Xbim Interop Library Build Targets **
******************************************************************************
-->
<Target Name="CopyXbimInteropFiles"
Condition="'$(CopyXbimInteropFiles)' != 'false' And
'$(OutputPath)' != '' And
HasTrailingSlash('$(OutputPath)') And
Exists('$(OutputPath)')"
Inputs="@(XbimInteropFiles)"
Outputs="@(XbimInteropFiles -> '$(OutputPath)%(RecursiveDir)%(Filename)%(Extension)')">
<!--
NOTE: Copy "Xbim.Geometry.Enginexx.dll" and all related files, for every
architecture that we support, to the build output directory.
-->
<Message Text="Copying Geometry Engine files @(XbimInteropFiles)." Importance="high" />
<Message Text="Copying Geometry Engines to bin directory $(OutputPath)$(XBimCustomBinPath)." Importance="high" />
<Copy SourceFiles="@(XbimInteropFiles)"
DestinationFiles="@(XbimInteropFiles -> '$(OutputPath)%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<!--
******************************************************************************
-->
<Target Name="CleanXbimInteropFiles"
Condition="'$(CleanXbimInteropFiles)' != 'false' And
'$(OutputPath)' != '' And
HasTrailingSlash('$(OutputPath)') And
Exists('$(OutputPath)')">
<!--
NOTE: Delete "Xbim.Geometry.Enginexx.dll" and all related files, for every
architecture that we support, from the build output directory.
-->
<Delete Files="@(XbimInteropFiles -> '$(OutputPath)%(RecursiveDir)%(Filename)%(Extension)')" />
</Target>
<Target Name="ExtendedPublishChecks">
<Touch Files="@(IntermediateAssembly)" />
<Error Condition=" '$(Configuration)' != 'Release' "
Text="Ensure that the release is done through the Release configuration" />
<CreateItem Include="@(XbimInteropFiles)" AdditionalMetadata="TargetPath=%(RecursiveDir)%(Filename)%(Extension);IsDataFile=false">
<Output TaskParameter="Include" ItemName="_DeploymentManifestFiles" />
</CreateItem>
</Target>
<!--
******************************************************************************
** Xbim Geometry Interop Library Build Properties **
******************************************************************************
-->
<PropertyGroup>
<BuildDependsOn>
$(BuildDependsOn);
CopyXbimInteropFiles;
</BuildDependsOn>
<PublishOnlyDependsOn>
ExtendedPublishChecks;
$(PublishOnlyDependsOn);
</PublishOnlyDependsOn>
<CleanDependsOn>
$(CleanDependsOn);
CleanXbimInteropFiles;
</CleanDependsOn>
</PropertyGroup>
</Project>