blob: 201bbe93e2c77a868797acf984aa92a107ff48a4 (
plain)
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
|
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
<Configuration Condition="'$(Configuration)' == ''">Release</Configuration>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<Import Project="$(MSBuildThisFileDirectory)\..\..\config\ice.common.targets" />
<Import Project="$(MSBuildThisFileDirectory)..\..\config\icebuilder.props" />
<!-- Ice for PHP configurations -->
<PropertyGroup>
<CppDistTargets>c++98\slice2php;c++98\slice2html;c++98\icessl;c++98\icediscovery;c++98\icelocatordiscovery</CppDistTargets>
<CppConfiguration Condition="'$(Configuration)' == 'NTS-Debug' or '$(Configuration)' == 'Debug'">Debug</CppConfiguration>
<CppConfiguration Condition="'$(Configuration)' == 'NTS-Release' or '$(Configuration)' == 'Release'">Release</CppConfiguration>
<BuildWithPhpVersion Condition="'$(BuildWithPhpVersion)' == '' and '$(DefaultPlatformToolset)' == 'v141'">7.2</BuildWithPhpVersion>
<BuildWithPhpVersion Condition="'$(BuildWithPhpVersion)' == '' and '$(DefaultPlatformToolset)' == 'v140'">7.1</BuildWithPhpVersion>
<PackageDirectory>zeroc.ice.php$(BuildWithPhpVersion)</PackageDirectory>
</PropertyGroup>
<Target Name="NuGetRestore" DependsOnTargets="GetNuGet">
<!-- Restore NuGet packages to build Ice for PHP distribution -->
<Exec Command="$(NuGetExe) restore $(MSBuildThisFileDirectory)ice.sln" Condition="'$(ICE_BIN_DIST)' != 'all'"/>
<Exec Command="$(NuGetExe) install zeroc.ice.$(DefaultPlatformToolSet) -OutputDirectory $(MSBuildThisFileDirectory)\packages -Version $(IceJSONVersion)"
Condition="'$(ICE_BIN_DIST)' == 'cpp'"/>
</Target>
<Choose>
<When Condition="'$(ICE_BIN_DIST)' == 'cpp'">
<PropertyGroup>
<IceHome>$(MSBuildThisFileDirectory)\packages\zeroc.ice.$(DefaultPlatformToolSet).$(IceJSONVersion)</IceHome>
<IceToolsPath>$(IceHome)\tools</IceToolsPath>
</PropertyGroup>
</When>
<When Condition="'$(ICE_BIN_DIST)' == 'all'">
<PropertyGroup>
<IceToolsPath>$(IceHome)\bin</IceToolsPath>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<IceHome>$(MSBuildThisFileDirectory)..\..</IceHome>
<IceToolsPath>$(IceHome)\cpp\bin\$(Platform)\$(CppConfiguration)</IceToolsPath>
</PropertyGroup>
</Otherwise>
</Choose>
<Choose>
<!--
If BuildAllConfigurations is set to yes we build all configurations that are
part of the binary distribution, otherwise we just build the given platform
and configuration.
-->
<When Condition="'$(BuildAllConfigurations)' == 'yes'">
<PropertyGroup>
<DefaultBuild>x64|Release</DefaultBuild>
</PropertyGroup>
<!-- Ice for C++ configurations -->
<ItemGroup>
<CppDistSolution Include="$(MSBuildThisFileDirectory)..\..\cpp\msbuild\ice.$(DefaultPlatformToolset).sln">
<Properties>Configuration=Release;Platform=Win32</Properties>
</CppDistSolution>
<CppDistSolution Include="$(MSBuildThisFileDirectory)..\..\cpp\msbuild\ice.$(DefaultPlatformToolset).sln">
<Properties>Configuration=Release;Platform=x64</Properties>
</CppDistSolution>
</ItemGroup>
<ItemGroup Condition="'$(DefaultPlatformToolset)' == 'v140'">
<DistSolution Include="ice.sln">
<Properties>Configuration=Release;Platform=Win32;BuildWithPhpVersion=7.1</Properties>
</DistSolution>
<DistSolution Include="ice.sln">
<Properties>Configuration=NTS-Release;Platform=Win32;BuildWithPhpVersion=7.1</Properties>
</DistSolution>
<DistSolution Include="ice.sln">
<Properties>Configuration=Release;Platform=x64;BuildWithPhpVersion=7.1</Properties>
</DistSolution>
<DistSolution Include="ice.sln">
<Properties>Configuration=NTS-Release;Platform=x64;BuildWithPhpVersion=7.1</Properties>
</DistSolution>
<NugetPackage Include="zeroc.ice.php7.1">
<Properties>PackageName=zeroc.ice.php7.1;PhpVersion=7.1</Properties>
</NugetPackage>
</ItemGroup>
<ItemGroup Condition="'$(DefaultPlatformToolset)' == 'v141'">
<DistSolution Include="ice.sln">
<Properties>Configuration=Release;Platform=Win32;BuildWithPhpVersion=7.2</Properties>
</DistSolution>
<DistSolution Include="ice.sln">
<Properties>Configuration=NTS-Release;Platform=Win32;BuildWithPhpVersion=7.2</Properties>
</DistSolution>
<DistSolution Include="ice.sln">
<Properties>Configuration=Release;Platform=x64;BuildWithPhpVersion=7.2</Properties>
</DistSolution>
<NugetPackage Include="zeroc.ice.php7.2">
<Properties>PackageName=zeroc.ice.php7.2;PhpVersion=7.2</Properties>
</NugetPackage>
<DistSolution Include="ice.sln">
<Properties>Configuration=NTS-Release;Platform=x64;BuildWithPhpVersion=7.2</Properties>
</DistSolution>
<DistSolution Include="ice.sln">
<Properties>Configuration=Release;Platform=Win32;BuildWithPhpVersion=7.3</Properties>
</DistSolution>
<DistSolution Include="ice.sln">
<Properties>Configuration=NTS-Release;Platform=Win32;BuildWithPhpVersion=7.3</Properties>
</DistSolution>
<DistSolution Include="ice.sln">
<Properties>Configuration=Release;Platform=x64;BuildWithPhpVersion=7.3</Properties>
</DistSolution>
<DistSolution Include="ice.sln">
<Properties>Configuration=NTS-Release;Platform=x64;BuildWithPhpVersion=7.3</Properties>
</DistSolution>
<NugetPackage Include="zeroc.ice.php7.3">
<Properties>PackageName=zeroc.ice.php7.3;PhpVersion=7.3</Properties>
</NugetPackage>
</ItemGroup>
</When>
<Otherwise>
<ItemGroup>
<CppDistSolution Include="$(MSBuildThisFileDirectory)..\..\cpp\msbuild\ice.$(DefaultPlatformToolset).sln">
<Properties>Configuration=$(CppConfiguration);Platform=$(Platform)</Properties>
</CppDistSolution>
<DistSolution Include="ice.sln">
<Properties>Configuration=$(Configuration);Platform=$(Platform);BuildWithPhpVersion=$(BuildWithPhpVersion)</Properties>
</DistSolution>
</ItemGroup>
</Otherwise>
</Choose>
<Target Name="BuildCppDist" Condition="'$(ICE_BIN_DIST)' != 'cpp'">
<Exec Command="$(NuGetExe) restore $(MSBuildThisFileDirectory)..\..\cpp\msbuild\ice.$(DefaultPlatformToolset).sln"/>
<MSBuild Projects="@(CppDistSolution)"
Targets="$(CppDistTargets)"
BuildInParallel="true"
Properties="%(Properties)" />
</Target>
<Target Name="BuildDist" DependsOnTargets="NuGetRestore;BuildCppDist" Condition="'$(ICE_BIN_DIST)' != 'all'">
<MSBuild Projects="ice.php.proj"
Properties="IceHome=$(IceHome);IceToolsPath=$(IceToolsPath)"
Targets="SliceCompile"/>
<MSBuild Projects="@(DistSolution)"
Properties="%(Properties)" />
</Target>
<Target Name="CleanDist" Condition="'$(ICE_BIN_DIST)' != 'all'">
<MSBuild Projects="ice.php.proj"
Properties="IceHome=$(IceHome);IceToolsPath=$(IceToolsPath)"
Targets="SliceCompileClean"/>
<MSBuild Projects="@(DistSolution)"
BuildInParallel="true"
Properties="%(Properties)"
Targets="Clean" />
</Target>
<Target Name="Build" DependsOnTargets="BuildDist;NuGetRestore">
<Error Text="Ice Installation invalid or not detected. Invalid IceHome setting `$(IceHome)'"
Condition="!Exists('$(IceHome)')" />
<MSBuild Projects="ice.php.test.proj"
Properties="IceHome=$(IceHome);IceToolsPath=$(IceToolsPath)"
Targets="SliceCompile"/>
</Target>
<Target Name="Clean" DependsOnTargets="CleanDist">
<MSBuild Projects="ice.php.test.proj"
Properties="IceHome=$(IceHome);IceToolsPath=$(IceToolsPath)"
Targets="SliceCompileClean"/>
</Target>
<Target Name="NuGetPack" DependsOnTargets="BuildDist">
<MSBuild Projects="ice.nugetpack.targets"
Properties="%(NugetPackage.Properties);DefaultPlatformToolset=$(DefaultPlatformToolset);NuGetExe=$(NuGetExe)"/>
</Target>
</Project>
|