Skip to content

Commit

Permalink
Don't build accelerated 3D viewer class if Java3D is not present
Browse files Browse the repository at this point in the history
git-svn-id: https://cdk.svn.sourceforge.net/svnroot/cdk/trunk/cdk@1015 eb4e18e3-b210-0410-a6ab-dec725e4b171
  • Loading branch information
egonw committed Feb 20, 2003
1 parent 45041c5 commit 88b3428
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 14 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Expand Up @@ -12,6 +12,7 @@ New:
Changes:
* Added one-click (not-patented ;) deselect of atoms in lasso mode
* Libio for Jmol and JOELib is now conditionally build
* Java3D depending classes are now conditionally build

Fixes:
* Fixed reading of AtomType's with JSX
Expand Down
38 changes: 24 additions & 14 deletions build.xml
Expand Up @@ -46,6 +46,9 @@
<available classname="joelib.molecule.JOEAtom"
classpath="${lib}/libio/joelib.jar"
property="joelib.present"/>
<available classname="javax.media.j3d.Canvas3D"
classpathref="project.class.path"
property="java3D.present"/>
</target>

<target name="init" depends="check">
Expand Down Expand Up @@ -77,20 +80,12 @@
</target>

<target name="compile">
<echo message="Compiling only the classes that don't use Java3d."/>
<echo message="Use 'compile-with-java3d' target for full Java3D support."/>

<antcall target="compile-all"/>
</target>

<target name="compile-with-java3d">
<antcall target="compile-all"/>
<antcall target="compile-render-with-java3d"/>
</target>

<target name="compile-all"
depends="init, info, compile-core, compile-standard, compile-extra, compile-io,
compile-render, compile-libio">
compile-render, compile-render-with-java3d, compile-libio">
</target>

<target name="compile-libio" depends="dist-standard, dont-compile-libio-joelib, compile-libio-joelib,
Expand Down Expand Up @@ -254,10 +249,21 @@
</javac>
</target>

<target name="compile-render-with-java3d" depends="compile-render">

<target name="compile-render-with-java3d"
depends="dont-compile-render-with-java3d, do-compile-render-with-java3d"/>

<target name="dont-compile-render-with-java3d" depends="compile-render"
unless="java3D.present">
<echo message="Cannot compile Java3D based viewer classes. Java3D is not present" />
</target>

<target name="do-compile-render-with-java3d" depends="compile-render"
if="java3D.present">
<mkdir dir="${build}" />

<javac destdir="${build}" optimize="${optimization}"
<javac srcdir="${build.src}"
destdir="${build}" optimize="${optimization}"
debug="${debug}" deprecation="${deprecation}"
includesfile="${src}/java3d.classes">

Expand Down Expand Up @@ -445,10 +451,13 @@
</jar>
</target>

<target name="dist-render-with-java3d" depends="compile-render-with-java3d">
<jar jarfile="${dist}/jar/cdk-render-java3d.jar">
<target name="dist-render-with-java3d" depends="compile-render-with-java3d"
if="java3D.present">
<jar jarfile="${dist}/jar/cdk-render.jar">
<fileset dir="${build}">
<include name="org/openscience/cdk/renderer/**/*" />
<include name="org/openscience/cdk/controller/**/*" />
<include name="org/openscience/cdk/event/**/*" />
</fileset>
</jar>
</target>
Expand All @@ -474,7 +483,8 @@

<target name="dist-all" depends="dist-core, dist-standard,
dist-io, dist-render,
dist-extra, dist-libio" />
dist-extra, dist-libio,
dist-render-with-java3d" />

<target name="dist" depends="dist-all" />

Expand Down

0 comments on commit 88b3428

Please sign in to comment.