-
Notifications
You must be signed in to change notification settings - Fork 3
/
zlib.proj
69 lines (52 loc) · 3.33 KB
/
zlib.proj
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
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003" DefaultTargets="install" ToolsVersion="3.5">
<!--
Ex:
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Project.proj -> both platforms
C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe Project.proj /p:Platform="x86" -> x86 only
MSBuild.exe zlib.proj /p:SRCROOT="c:\sources\zlib" /p:DSTROOT="c:\roots\zlib"
-->
<!--
Unless 'vcvars=none' is included in the buildArguments, the build system will call vcvars before invoking MSBuild.
If vcvars has been called, VCINSTALLDIR will be defined to the appropriate VC path. Otherwise, the path will be
retrieved from the registry.
For manual builds, either call vcvars before invoking MSBuild or change the version in the registry key below to match the system.
-->
<PropertyGroup>
<VCPath Condition="'$(VCINSTALLDIR)' == ''">$(registry:HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\VisualStudio\11.0\Setup\VC@ProductDir)</VCPath>
<VCPath Condition="'$(VCINSTALLDIR)' != ''">$(VCINSTALLDIR)</VCPath>
</PropertyGroup>
<ItemGroup>
<!-- command line platforms (/p:Platform="xxx;yyy") -->
<PlatformList Condition="'@(PlatformList)' == '' and $(Platform) != ''" Include="$(Platform.Split(';'))" />
<!-- default platforms: x86 and x64 cross -->
<PlatformList Condition="'@(PlatformList)' == ''" Include="x86;x86_amd64" />
</ItemGroup>
<Target Name="install">
<!-- SRCROOT, DSTROOT, and OBJROOT must be defined -->
<Error Text="SRCROOT property or environment variable must be defined." Condition="'$(SRCROOT)' == ''"/>
<Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''"/>
<ItemGroup>
<NMakeArgs Include="SRCROOT="$(SRCROOT)""/>
<NMakeArgs Include="DSTROOT="$(DSTROOT)""/>
</ItemGroup>
<!-- ensure the registry queries succeeded -->
<Error Text="Cannot determine Visual Studio 'vcvars' location." Condition="'$(VCPath)' == ''"/>
<!-- The following will be executed once for each item in $(PlatformList) -->
<Exec Command="call "$(VCPath)vcvarsall.bat" %(PlatformList.Identity) &
nmake.exe /f $(MSBuildProjectDirectory)\NMakefile PLATFORM=%(PlatformList.Identity) @(NMakeArgs, ' ') install" />
</Target>
<Target Name="install_DEBUG">
<!-- SRCROOT, DSTROOT, and OBJROOT must be defined -->
<Error Text="SRCROOT property or environment variable must be defined." Condition="'$(SRCROOT)' == ''"/>
<Error Text="DSTROOT property or environment variable must be defined." Condition="'$(DSTROOT)' == ''"/>
<ItemGroup>
<NMakeArgs Include="SRCROOT="$(SRCROOT)""/>
<NMakeArgs Include="DSTROOT="$(DSTROOT)""/>
</ItemGroup>
<!-- ensure the registry queries succeeded -->
<Error Text="Cannot determine Visual Studio 'vcvars' location." Condition="'$(VCPath)' == ''"/>
<!-- The following will be executed once for each item in $(PlatformList) -->
<Exec Command="call "$(VCPath)vcvarsall.bat" %(PlatformList.Identity) &
nmake.exe /f $(MSBuildProjectDirectory)\NMakefile PLATFORM=%(PlatformList.Identity) @(NMakeArgs, ' ') install_DEBUG" />
</Target>
</Project>