diff options
author | Sven Gothel <[email protected]> | 2014-06-19 23:58:38 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2014-06-19 23:58:38 +0200 |
commit | 8a4dacf38c9d78bc0aafae91cbd256148835ee9b (patch) | |
tree | abc3f1cc215f106b11cf8f3f6dd217dbe57bd34d /make | |
parent | 40d7d0d18ed11b8dbb0f16137f82eef828b822a4 (diff) |
Bug 1021: Add OculusSDK binding / Basic OVR support (Refine build exclusion)
common:
- property 'oculusvr.sdk.available' is only set if sub-module 'oculusvr-sdk' is available
- if 'oculusvr.sdk.available' is not set build.xml will not issue build-oculusvr.xml's 'all' target
build-oculusvr.xml:
- propery 'oculusvr.build.enabled' is only enabled if 'oculusvr.sdk.available' is set
and targer 'all' will only pass if set.
Diffstat (limited to 'make')
-rw-r--r-- | make/build-common.xml | 6 | ||||
-rw-r--r-- | make/build-oculusvr.xml | 19 | ||||
-rw-r--r-- | make/build.xml | 2 |
3 files changed, 22 insertions, 5 deletions
diff --git a/make/build-common.xml b/make/build-common.xml index 5a6d9c061..974f66d5e 100644 --- a/make/build-common.xml +++ b/make/build-common.xml @@ -234,6 +234,12 @@ <property name="build.oculusvr" value="${build}/oculusvr" /> <property name="obj.oculusvr" value="${build.oculusvr}/obj"/> + <property name="rootrel.oculusvr.sdk" value="oculusvr-sdk"/> + <property name="rel.oculusvr.sdk" value="${project.root}/${rootrel.oculusvr.sdk}"/> + <condition property="oculusvr.sdk.available"> + <available file="${rel.oculusvr.sdk}/LibOVR/Src/OVR_CAPI.h"/> + </condition> + <property name="results.test" value="${build}/test/results" /> <property name="build.test" value="${build}/test/build" /> <property name="obj.test" value="${build.test}/obj"/> diff --git a/make/build-oculusvr.xml b/make/build-oculusvr.xml index 37d06c7d3..a929a8fc7 100644 --- a/make/build-oculusvr.xml +++ b/make/build-oculusvr.xml @@ -43,9 +43,6 @@ <property name="rootrel.src.generated" value="${rootrel.build}/oculusvr/gensrc" /> <property name="rootrel.generated.c" value="${rootrel.src.generated}/native/oculusvr" /> - <property name="rootrel.oculusvr.sdk" value="oculusvr-sdk"/> - <property name="rel.oculusvr.sdk" value="${project.root}/${rootrel.oculusvr.sdk}"/> - <!-- The source directories. --> <property name="src.java" value="${project.root}/${rootrel.src.java}" /> <property name="src.c" value="${project.root}/${rootrel.src.c}" /> @@ -86,8 +83,13 @@ <property name="javadoc.dev.packagenames" value="${javadoc.packagenames},jogamp.opengl.*,com.jogamp.gluegen,com.jogamp.gluegen.runtime" /> + <condition property="oculusvr.build.enabled"> + <isset property="oculusvr.sdk.available"/> + </condition> + <condition property="c.build.supported"> <and> + <isset property="oculusvr.build.enabled"/> <or> <isset property="isLinuxX86"/> <isset property="isLinuxAMD64"/> @@ -101,6 +103,8 @@ </not> </and> </condition> + <echo message="oculusvr.sdk.available ${oculusvr.sdk.available}" /> + <echo message="oculusvr.build.enabled ${oculusvr.build.enabled}" /> <echo message="c.build.supported ${c.build.supported}" /> </target> @@ -661,7 +665,14 @@ <!-- - Build everything. --> - <target name="all" description="Build OculusVR JAR file(s) and native libraries." depends="init,java.compile,c.build,build-jars,generate.version.txt" /> + <target name="all" + description="Build OculusVR JAR file(s) and native libraries." + depends="init" if="oculusvr.build.enabled"> + <antcall target="all.impl" inheritRefs="true" /> + </target> + <target name="all.impl" + description="Build OculusVR JAR file(s) and native libraries." + depends="java.compile,c.build,build-jars,generate.version.txt"/> <target name="generate.version.txt" depends="init"> <!-- Create a version.txt file indicating which version we just built --> diff --git a/make/build.xml b/make/build.xml index b356e2a1f..2e5a664c8 100644 --- a/make/build.xml +++ b/make/build.xml @@ -79,7 +79,7 @@ <ant antfile="${newt.build.xml}" dir="${newt.make}" target="all" inheritRefs="true" inheritAll="true"/> </target> - <target name="build.oculusvr" depends="init"> + <target name="build.oculusvr" depends="init" if="oculusvr.sdk.available"> <ant antfile="${oculusvr.build.xml}" dir="${oculusvr.make}" target="all" inheritRefs="true" inheritAll="true"/> </target> |