This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
forked from nanthony21/MM3rdparty
-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.xml
60 lines (53 loc) · 2.12 KB
/
build.xml
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
<project name="3rdPartyDependencies" default="build">
<!--checking if for windows and non windows OS-->
<target depends="build-windows, build-unix" name="build"/>
<condition property="isOSWindows">
<os family="windows" />
</condition>
<!-- Argument to select which boost modules are compiled. Saves time and storage space -->
<property name="reqBoostLibs" value="--with-chrono --with-date_time --with-filesystem --with-math --with-system --with-thread" />
<target name="build-windows" if="isOSWindows">
<!-- Find the bat file that activates the Visual Studio environment -->
<local name="env"/>
<property environment="env"/>
<local name="activateVSVarsBat"/>
<property name="activateVSVarsBat" value="${env.VS100COMNTOOLS}vsvars32.bat"/>
<fail message="Cannot locate vsvars32.bat for Visual Studio 2010">
<condition> <not> <available file="${activateVSVarsBat}"/> </not> </condition>
</fail>
<!-- Activate the VS2010 environment, bootstrap the build system, make sure all header links are in place. build Release and Debug for 32bit and 64bit. -->
<echo file="boost\temp.bat">
@echo off
call "${activateVSVarsBat}"
if errorlevel 1 exit /b
call bootstrap.bat
if errorlevel 1 exit /b
.\b2 headers
if errorlevel 1 exit /b
.\b2 ${reqBoostLibs} architecture=x86 address-model=32 --stagedir=stage_Win32
if errorlevel 1 exit /b
.\b2 ${reqBoostLibs} architecture=x86 address-model=64 --stagedir=stage_x64
</echo>
<exec dir="boost" executable="cmd" failonerror="true">
<arg value="/c"/>
<arg value="temp.bat"/>
</exec>
<delete file="temp.bat"/>
</target>
<target name="build-unix" unless="isOSWindows">
<exec dir="boost" executable="/bin/sh" failonerror="true">
<arg line="-c bootstrap.sh"/>
</exec>
<exec dir="boost" executable="/bin/sh" failonerror="true">
<arg line="-c ./b2 headers" />
</exec>
<exec dir="boost" executable="/bin/sh" failonerror="true">
<arg line="-c ./b2 ${reqBoostLibs}" />
</exec>
</target>
<target name="clean">
<exec dir="boost" executable="cmd" failonerror="true">
<arg line=" echo /c .\b2 --clean-all" />
</exec>
</target>
</project>