svn-gvsig-desktop / trunk / libraries / libjni-mrsid / build.xml @ 40328
History | View | Annotate | Download (2.33 KB)
1 |
<project name="libjni-mrsid" default="main" basedir="."> |
---|---|
2 |
<description>
|
3 |
Compila la librerÃa jmrsid |
4 |
</description>
|
5 |
|
6 |
<property name="src-java" location="src/main/java" /> |
7 |
<property name="src-test-java" location="src/test/java" /> |
8 |
<property name="jar-dist" location="jar-dist" /> |
9 |
<property name="build" location="bin/" /> |
10 |
<property name="build-test" location="bin-test/" /> |
11 |
<property name="cmake_build" location="BMCMake/" /> |
12 |
<property name="sdk-dir" location="/home/miguel/mrsid/Geo_DSDK-6.0.7.1407" /> |
13 |
<property environment="env"/> |
14 |
<condition property="jmrsid_version" value="0.0.6"> |
15 |
<os family="unix"/> |
16 |
</condition>
|
17 |
<condition property="jmrsid_version" value="006"> |
18 |
<os family="windows"/> |
19 |
</condition>
|
20 |
<property name="jmrsid-jar" location="jmrsid-0.0.6.jar" /> |
21 |
<condition property="cmake_generator" value="'Unix Makefiles'"> |
22 |
<os family="unix"/> |
23 |
</condition>
|
24 |
<condition property="cmake_generator" value="'NMake Makefiles'"> |
25 |
<os family="windows"/> |
26 |
</condition>
|
27 |
|
28 |
<target name="main" description="compile java code, make jars, prepare and compile natives" depends="clean,jar,prepare-natives,compile-natives"> |
29 |
</target>
|
30 |
|
31 |
<target name="jar" description="makes jar file"> |
32 |
<mkdir dir="${build}" /> |
33 |
<javac srcdir="${src-java}" destdir="${build}" debug="true" /> |
34 |
<mkdir dir="${jar-dist}" /> |
35 |
<jar jarfile="${jmrsid-jar}" basedir="${build}" includes="es/gva/cit/jmrsid/**" /> |
36 |
<move file="${jmrsid-jar}" todir="${jar-dist}" /> |
37 |
</target>
|
38 |
|
39 |
<target name="prepare-natives" description="prepares the natives to be compiled"> |
40 |
<mkdir dir="${cmake_build}"/> |
41 |
<delete file="${cmake_build}/CMakeCache.txt"/> |
42 |
<exec dir="${cmake_build}" executable="cmake"> |
43 |
<arg line=".." /> |
44 |
<arg line="-G${cmake_generator}" /> |
45 |
<arg line="-DMRSID_DIR=${sdk-dir}" /> |
46 |
<arg line="-DCMAKE_BUILD_TYPE=Release" /> |
47 |
<arg line="-DJMRSID_VERSION=${jmrsid_version}" /> |
48 |
</exec>
|
49 |
</target>
|
50 |
|
51 |
<target name="compile-natives" description="compiles natives"> |
52 |
<exec dir="${cmake_build}" executable="make" os="Linux"> |
53 |
<arg line="install" /> |
54 |
</exec>
|
55 |
<exec dir="${cmake_build}" executable="nmake" os="Windows 98,Windows 2000,Windows XP,Windows NT (Unknown)"> |
56 |
<arg line="install" /> |
57 |
</exec>
|
58 |
</target>
|
59 |
|
60 |
|
61 |
<target name="clean" description="clean distribution"> |
62 |
<delete dir="jar-dist"/> |
63 |
<delete dir="lib-dist"/> |
64 |
<delete dir="BMCMake"/> |
65 |
</target>
|
66 |
|
67 |
</project>
|