This repository was archived by the owner on Mar 24, 2020. It is now read-only.
forked from springmeyer/mapnik-jni
-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.xml
98 lines (85 loc) · 3.1 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
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
<project name="mapnik_jni" default="all">
<property name="junit.jar" location="lib/junit-4.8.2.jar"/>
<property name="javadoc.dir" location="pages/javadocs"/>
<target name="compile">
<mkdir dir="build/classes"/>
<mkdir dir="csrc"/>
<javac srcdir="src" destdir="build/classes" debug="on" source="1.8" target="1.8" includeantruntime="false"/>
</target>
<target name="headers" depends="compile">
<javah class="mapnik.Parameters,mapnik.Mapnik,mapnik.MapDefinition,mapnik.Layer,mapnik.FeatureTypeStyle,mapnik.Datasource,mapnik.DatasourceCache,mapnik.Projection,mapnik.Query,mapnik.FeatureSet,mapnik.Geometry,mapnik.Image,mapnik.Renderer,mapnik.FreetypeEngine" outputfile="csrc/mapnikjni.h" classpath="build/classes"/>
</target>
<target name="jar" depends="compile">
<mkdir dir="build/dist"/>
<jar jarfile="build/dist/mapnik-jni.jar" basedir="build/classes"/>
</target>
<target name="test" depends="jar,native">
<mkdir dir="build/classes-test"/>
<mkdir dir="build/testresults"/>
<javac srcdir="test" destdir="build/classes-test" debug="on" source="1.8" target="1.8" includeantruntime="false">
<classpath>
<pathelement location="${junit.jar}"/>
<pathelement location="build/dist/mapnik-jni.jar"/>
</classpath>
</javac>
<junit fork="true" failureproperty="tests.failed" showoutput="false" printsummary="true">
<classpath>
<pathelement location="${junit.jar}"/>
<pathelement location="build/dist/mapnik-jni.jar"/>
<pathelement location="build/classes-test"/>
</classpath>
<sysproperty key="java.library.path" value="build/dist/"/>
<formatter type="plain"/>
<batchtest todir="build/testresults">
<fileset dir="build/classes-test">
<include name="mapnik/Test*.class"/>
<exclude name="mapnik/TestBase.class"/>
</fileset>
</batchtest>
</junit>
<fail if="tests.failed" message="One or more tests failed"/>
</target>
<target name="javadoc">
<delete dir="${javadoc.dir}"/>
<mkdir dir="${javadoc.dir}"/>
<javadoc sourcepath="src" destdir="${javadoc.dir}"
packagenames="mapnik"
access="public"
encoding="UTF-8"
windowtitle="mapnik-jni API documentation"
source="1.8"
/>
</target>
<target name="clean">
<delete dir="build"/>
<delete dir="csrc">
<include name="*.jnilib"/>
<include name="*.so"/>
<include name="*.dll"/>
</delete>
</target>
<target name="native-init" depends="headers">
<condition property="platform.makefile" value="Makefile.osx">
<os family="mac"/>
</condition>
<condition property="platform.makefile" value="Makefile.linux">
<os family="unix" name="linux"/>
</condition>
</target>
<target name="native-build" if="platform.makefile">
<exec dir="csrc" executable="make" failonerror="true">
<arg value="-f"/>
<arg value="${platform.makefile}"/>
</exec>
<mkdir dir="build/dist"/>
<copy todir="build/dist">
<fileset dir="csrc">
<include name="*.jnilib"/>
<include name="*.so"/>
</fileset>
</copy>
</target>
<target name="native" depends="native-init,native-build"/>
<target name="all" depends="jar,native"/>
<target name="dist" depends="clean,all"/>
</project>