aboutsummaryrefslogtreecommitdiffstats
path: root/make/build-common.xml
diff options
context:
space:
mode:
authorSven Gothel <[email protected]>2014-06-19 23:21:19 +0200
committerSven Gothel <[email protected]>2014-06-19 23:21:19 +0200
commit40d7d0d18ed11b8dbb0f16137f82eef828b822a4 (patch)
tree954cb10ac50d0eea506c4b4b9dc5b5bac39d99e0 /make/build-common.xml
parent20bf51f2ccbecf1ab21ef3dbd2ff06e04ebd40cc (diff)
Bug 1021: Add OculusSDK binding / Basic OVR support
Bring-up test only initializes the ovrHmdHandle data structure by OVR native code. See com.jogamp.oculusvr.OVRVersion Current evaluation build compiles all OVR-SDK source files itself w/o using provided libovr.a. We also skip the GL dependent renderer of the SDK, i.e. we prefer to utilize our JOGL 'barrel distortion' renderer. This eases the 'chicken-egg' problem of OVR SDK dependencies, i.e. libGL, libGLESv2 .. etc Since the OVR source code is C++, we may still have to figure out how to / and whether we shall link libstdc++ statically to remove platform dependencies. Right now we link libstdc++ statically if using GCC, see make/build-oculusvr.xml (hackish .. TODO: better way to include all symbols). Same consideration applies to GNU/Linux and libudev.so dependency, since there are: - libudev.so.0 and (Older distri's) - libudev.so.1 (Debian8, ..) ... Produced JAR artifacts are - jar/atomic/oculusvr.jar - jar/atomic/oculusvr-natives-<os.and.arch>.jar i.e. only in 'atomic' variants to not bloat the default 'all' JAR files. .... make/build-oculusvr.xml Notes: - Currently native build only enabled on GNU/Linux (isLinux) - Force disable native build via property 'c.build.oculusvr.skip'
Diffstat (limited to 'make/build-common.xml')
-rw-r--r--make/build-common.xml41
1 files changed, 30 insertions, 11 deletions
diff --git a/make/build-common.xml b/make/build-common.xml
index c62e269a8..5a6d9c061 100644
--- a/make/build-common.xml
+++ b/make/build-common.xml
@@ -55,6 +55,7 @@
<property name="src" value="${project.root}/src" />
<property name="lib" value="${build}/lib" />
<property name="jar" value="${build}/jar" />
+ <property name="jar-atomic" value="${build}/jar/atomic" />
<property name="all.srcj.path" value="${src}/nativewindow/classes;${src}/jogl/classes;${src}/newt/classes" />
<!-- No generated classes for Newt at the present time -->
@@ -228,9 +229,14 @@
<property name="build.newt" value="${build}/newt" />
<property name="obj.newt" value="${build.newt}/obj"/>
- <property name="results.test" value="${build}/test/results" />
- <property name="build.test" value="${build}/test/build" />
- <property name="obj.test" value="${build.test}/obj"/>
+ <property name="oculusvr.make" value="." />
+ <property name="oculusvr.build.xml" value="${oculusvr.make}/build-oculusvr.xml" />
+ <property name="build.oculusvr" value="${build}/oculusvr" />
+ <property name="obj.oculusvr" value="${build.oculusvr}/obj"/>
+
+ <property name="results.test" value="${build}/test/results" />
+ <property name="build.test" value="${build}/test/build" />
+ <property name="obj.test" value="${build.test}/obj"/>
<condition property="obj.custom" value="${custom.libdir}${path.separator}" else="">
<isset property="custom.libdir"/>
@@ -238,11 +244,14 @@
<property name="obj.all.paths" value="${obj.custom}${obj.gluegen}${path.separator}${obj.nativewindow}${path.separator}${obj.jogl}${path.separator}${obj.newt}${path.separator}${obj.test}" />
+ <!-- Add the GlueGen task to ANT -->
<path id="gluegen.classpath">
<pathelement location="${gluegen.jar}" />
<pathelement location="${antlr.jar}" />
</path>
-
+ <taskdef name="gluegen" classname="com.jogamp.gluegen.ant.GlueGenTask"
+ classpathref="gluegen.classpath" />
+
<property name="gluegen-gl.jar" value="${build.jogl}/gluegen-gl.jar" />
<path id="gluegen-gl.classpath">
@@ -410,6 +419,11 @@
<pathelement location="${newt-driver-android.jar}" />
</path>
+ <property name="oculusvr.jar" value="${jar-atomic}/oculusvr.jar" />
+ <path id="oculusvr_all_atoms.classpath">
+ <pathelement location="${oculusvr.jar}" />
+ </path>
+
<!-- JavaSE combinations -->
<property name="gluegen-rt.jar" value="${build.gluegen}/gluegen-rt.jar" />
<property name="gluegen-rt-android.jar" value="${build.gluegen}/gluegen-rt-android.jar" />
@@ -492,6 +506,7 @@
<path refid="nativewindow_all_atoms.classpath" />
<path refid="jogl_all_atoms.classpath" />
<path refid="newt_all_atoms.classpath" />
+ <path refid="oculusvr_all_atoms.classpath"/>
</path>
<path id="junit_jogl_newt_android.compile.classpath">
@@ -528,11 +543,12 @@
<pathelement location="${gluegen-rt.jar}" />
<pathelement location="${gluegen-test-util.jar}" />
<pathelement location="${jogl-all.jar}" />
+ <pathelement location="${oculusvr.jar}" />
<pathelement location="${jogl-test.jar}" />
</path>
<property name="junit_jogl_awt.run.jars"
- value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${ant-junit4.jar}${path.separator}${semver.jar}${path.separator}${gluegen-rt.jar}${path.separator}${gluegen-test-util.jar}${path.separator}${jogl-all.jar}${path.separator}${jogl-test.jar}"/>
- <property name="junit_jogl_awt.run.remote.jars" value="${junit.jar}${path.separator}${env.TARGET_ANT_HOME}/lib/ant.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit4.jar${path.separator}${semver.jar}${path.separator}${gluegen-rt.jar}${path.separator}${gluegen-test-util.jar}${path.separator}${jogl-all.jar}${path.separator}${jogl-test.jar}"/>
+ value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${ant-junit4.jar}${path.separator}${semver.jar}${path.separator}${gluegen-rt.jar}${path.separator}${gluegen-test-util.jar}${path.separator}${jogl-all.jar}${path.separator}${oculusvr.jar}${path.separator}${jogl-test.jar}"/>
+ <property name="junit_jogl_awt.run.remote.jars" value="${junit.jar}${path.separator}${env.TARGET_ANT_HOME}/lib/ant.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit4.jar${path.separator}${semver.jar}${path.separator}${gluegen-rt.jar}${path.separator}${gluegen-test-util.jar}${path.separator}${jogl-all.jar}${path.separator}${oculusvr.jar}${path.separator}${jogl-test.jar}"/>
<!-- Test Run w/o AWT .. -->
<path id="junit_jogl_noawt.run.classpath">
@@ -544,11 +560,12 @@
<pathelement location="${gluegen-rt.jar}" />
<pathelement location="${gluegen-test-util.jar}" />
<pathelement location="${jogl-all-noawt.jar}" />
+ <pathelement location="${oculusvr.jar}" />
<pathelement location="${jogl-test.jar}" />
</path>
<property name="junit_jogl_noawt.run.jars"
- value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${ant-junit4.jar}${path.separator}${semver.jar}${path.separator}${gluegen-rt.jar}${path.separator}${gluegen-test-util.jar}${path.separator}${jogl-all-noawt.jar}${path.separator}${jogl-test.jar}"/>
- <property name="junit_jogl_noawt.run.remote.jars" value="${junit.jar}${path.separator}${env.TARGET_ANT_HOME}/lib/ant.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit4.jar${path.separator}${semver.jar}${path.separator}${gluegen-rt.jar}${path.separator}${gluegen-test-util.jar}${path.separator}${jogl-all-noawt.jar}${path.separator}${jogl-test.jar}"/>
+ value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${ant-junit4.jar}${path.separator}${semver.jar}${path.separator}${gluegen-rt.jar}${path.separator}${gluegen-test-util.jar}${path.separator}${jogl-all-noawt.jar}${path.separator}${oculusvr.jar}${path.separator}${jogl-test.jar}"/>
+ <property name="junit_jogl_noawt.run.remote.jars" value="${junit.jar}${path.separator}${env.TARGET_ANT_HOME}/lib/ant.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit.jar${path.separator}${env.TARGET_ANT_HOME}/lib/ant-junit4.jar${path.separator}${semver.jar}${path.separator}${gluegen-rt.jar}${path.separator}${gluegen-test-util.jar}${path.separator}${jogl-all-noawt.jar}${path.separator}${oculusvr.jar}${path.separator}${jogl-test.jar}"/>
<!-- Test Run w/ SWT .. -->
<path id="junit_jogl_swt.run.classpath">
@@ -561,10 +578,11 @@
<pathelement location="${gluegen-test-util.jar}" />
<pathelement location="${swt.jar}" />
<pathelement location="${jogl-all.jar}" />
+ <pathelement location="${oculusvr.jar}" />
<pathelement location="${jogl-test.jar}" />
</path>
<property name="junit_jogl_swt.run.jars"
- value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${ant-junit4.jar}${path.separator}${semver.jar}${path.separator}${gluegen-rt.jar}${path.separator}${gluegen-test-util.jar}${path.separator}${swt.jar}${path.separator}${jogl-all.jar}${path.separator}${jogl-test.jar}"/>
+ value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${ant-junit4.jar}${path.separator}${semver.jar}${path.separator}${gluegen-rt.jar}${path.separator}${gluegen-test-util.jar}${path.separator}${swt.jar}${path.separator}${jogl-all.jar}${path.separator}${oculusvr.jar}${path.separator}${jogl-test.jar}"/>
<!-- Test Run w/ Android [w/o AWT] .. -->
<path id="junit_jogl_android.run.classpath">
@@ -577,12 +595,13 @@
<pathelement location="${gluegen-rt-android.jar}" />
<pathelement location="${gluegen-test-util.jar}" />
<pathelement location="${jogl-all-android.jar}" />
+ <pathelement location="${oculusvr.jar}" />
<pathelement location="${jogl-test.jar}" />
</path>
<property name="junit_jogl_android.run.jars"
- value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${ant-junit4.jar}${path.separator}${semver.jar}${path.separator}${gluegen-rt-android.jar}${path.separator}${gluegen-test-util.jar}${path.separator}${jogl-all-android.jar}${path.separator}${jogl-test.jar}"/>
+ value="${junit.jar}${path.separator}${ant.jar}${path.separator}${ant-junit.jar}${path.separator}${ant-junit4.jar}${path.separator}${semver.jar}${path.separator}${gluegen-rt-android.jar}${path.separator}${gluegen-test-util.jar}${path.separator}${jogl-all-android.jar}${path.separator}${oculusvr.jar}${path.separator}${jogl-test.jar}"/>
<property name="junit.run.remote.apks"
- value="${gluegen.root}/${rootrel.build}/jogamp.android-launcher.apk${path.separator}${ant-junit-all.apk}${path.separator}${gluegen.root}/${rootrel.build}/gluegen-rt-android-${android.abi}.apk${path.separator}${jogl-all-android.apk}${path.separator}${jogl-test.apk}"/>
+ value="${gluegen.root}/${rootrel.build}/jogamp.android-launcher.apk${path.separator}${ant-junit-all.apk}${path.separator}${gluegen.root}/${rootrel.build}/gluegen-rt-android-${android.abi}.apk${path.separator}${jogl-all-android.apk}${path.separator}${oculusvr.jar}${path.separator}${jogl-test.apk}"/>
<!-- Dummy extra CLASSPATH value, maybe overwritten -->
<property name="junit_extra_classpath" value=""/>