Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

102 lines (90 sloc) 3.35 kB
<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.5" target="1.5" includeantruntime="false"/>
<mkdir dir="build/classes-tools"/>
<javac srcdir="tools" destdir="build/classes-tools" debug="on" source="1.5" target="1.5" includeantruntime="false">
<classpath>
<pathelement location="build/classes"/>
</classpath>
</javac>
</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.5" target="1.5" 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>
<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.5"
/>
</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>
Jump to Line
Something went wrong with that request. Please try again.