source: trunk/components/bio-formats-jace/build.xml @ 4761

Revision 4761, 2.5 KB checked in by curtis, 11 years ago (diff)

Progress on bfjace. Working on Linux!

Line 
1<!--
2build.xml
3
4Ant build file for bfjace, the Bio-Formats Jace C++ bindings.
5Download Apache Ant from http://ant.apache.org/.
6Type "ant -p" for a list of targets.
7-->
8
9<project name="formats-jace" default="jar" basedir=".">
10  <description>
11    Build file for Bio-Formats Jace C++ bindings
12  </description>
13  <property file="base.properties"/>
14  <import file="${root.dir}/common.xml"/>
15  <property file="build.properties"/>
16
17  <!--
18  Guess where the java runtime classes are for Jace
19  Stolen from:
20  http://forums.gamegardens.com/discussion/mvnforum/viewthread?thread=324
21  -->
22  <!-- if Mac OS X -->
23  <property name="jre.macosx.classes"
24    value="/System/Library/Frameworks/JavaVM.framework/Classes/classes.jar"/>
25  <property name="jre.macosx.ui"
26    value="/System/Library/Frameworks/JavaVM.framework/Classes/ui.jar"/>
27  <condition property="jre.runtime"
28    value="${jre.macosx.classes}:${jre.macosx.ui}">
29    <and>
30      <os family="mac"/>
31      <os family="unix"/>
32    </and>
33  </condition>
34  <!-- Default for Unix -->
35  <property name="jre.runtime" value="${java.home}/lib/rt.jar"/>
36
37  <target name="gen-proxies" depends="clean-gen"
38    description="generate Jace proxies from C++ source code">
39    <mkdir dir="${jace.proxy-dir}/include"/>
40    <mkdir dir="${jace.proxy-dir}/source"/>
41    <java classname="jace.autoproxy.AutoProxy">
42      <arg path="include"/>
43      <arg path="source"/>
44      <arg path="${jace.proxy-dir}/include"/>
45      <arg path="${jace.proxy-dir}/source"/>
46      <arg path="${jre.runtime}:${artifact.dir}/bio-formats.jar"/>
47      <classpath>
48        <fileset dir="jace/lib">
49          <include name="*.jar"/>
50        </fileset>
51      </classpath>
52      <arg value="-mindep"/>
53    </java>
54  </target>
55
56  <target name="clean-gen" description="clean Jace proxies">
57    <delete dir="${jace.proxy-dir}"/>
58  </target>
59
60  <target name="build" depends="gen-proxies"
61    description="Build Bio-Formats Jace C++ library">
62    <mkdir dir="${cmake.build-dir}"/>
63    <exec executable="cmake" dir="${cmake.build-dir}">
64      <arg value=".."/>
65    </exec>
66    <exec executable="make" dir="${cmake.build-dir}"/>
67    <copy file="${cmake.build-dir}/jace/libjace.so" todir="${cmake.build-dir}"/>
68    <copy file="jace/lib/jace-runtime.jar" todir="${cmake.build-dir}"/>
69    <copy file="${artifact.dir}/loci_tools.jar" todir="${cmake.build-dir}"/>
70  </target>
71
72  <target name="clean-build" description="clean bfjace build files">
73    <delete dir="${cmake.build-dir}"/>
74  </target>
75
76</project>
Note: See TracBrowser for help on using the repository browser.