diff options
author | Sven Gothel <[email protected]> | 2013-02-17 15:16:03 +0100 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2013-02-17 15:16:03 +0100 |
commit | 4aa36ed61fd1bb434f2a5dd4d7dbffd6f87a446d (patch) | |
tree | f73789f888ecae6fcf554410e2f3ee5eb3c4d873 /make/jogamp-env.xml | |
parent | 1604f2341e496b380fbb3cf8d1e0134d947d8536 (diff) |
OSX Java6/Java7: Adapt to used JDK (Apple's Java6 or Oracle's Java7)
- Pick-up OSX Java7 locations if setup via ${java.home} and files available
- host.rt.jar, target.rt.jar
- java.home.dir
- java.includes.dir
- java.includes.dir.platform
- java.lib.dir.platform
- Remove 'very old' Java4/5 OSX locations
- Remove java.osx.frameworks.dir, since JavaNativeFoundation.h dependencies are removed
Diffstat (limited to 'make/jogamp-env.xml')
-rwxr-xr-x | make/jogamp-env.xml | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/make/jogamp-env.xml b/make/jogamp-env.xml index 07083c7..f02901e 100755 --- a/make/jogamp-env.xml +++ b/make/jogamp-env.xml @@ -136,30 +136,51 @@ <property name="target.sourcelevel" value="${ant.java.version}" /> <!-- default fallback values --> <property name="target.targetlevel" value="${ant.java.version}" /> <!-- default fallback values --> + <!-- default value for std Java --> + <condition property="target.rt.jar" + value="${java.home}/lib/rt.jar"> + <available file="${java.home}/lib/rt.jar"/> + </condition> <!-- default fallback value on OS X --> - <available property="target.rt.jar" - type="file" - file="/System/Library/Frameworks/JavaVM.framework/Versions/${ant.java.version}/Classes/classes.jar" - value="/System/Library/Frameworks/JavaVM.framework/Versions/${ant.java.version}/Classes/classes.jar"/> + <condition property="target.rt.jar" + value="/System/Library/Frameworks/JavaVM.framework/Versions/${ant.java.version}/Classes/classes.jar"> + <available file="/System/Library/Frameworks/JavaVM.framework/Versions/${ant.java.version}/Classes/classes.jar"/> + </condition> <!-- default fallback value on std Java --> - <property name="target.rt.jar" value="${java.home}/lib/rt.jar" /> <echo message="target.user.set ${target.user.set}"/> <echo message="target.sourcelevel ${target.sourcelevel}"/> <echo message="target.targetlevel ${target.targetlevel}"/> <echo message="target.rt.jar ${target.rt.jar}"/> + <fail message="No target.rt.jar specified not found."> + <condition> + <not> + <isset property="target.rt.jar"/> + </not> + </condition> + </fail> <property name="host.sourcelevel" value="${ant.java.version}" /> <!-- default values for compile time components --> <property name="host.targetlevel" value="${ant.java.version}" /> <!-- default values for compile time components --> - <!-- default fallback value for compile time components on OS X --> - <available property="host.rt.jar" - type="file" - file="/System/Library/Frameworks/JavaVM.framework/Versions/${ant.java.version}/Classes/classes.jar" - value="/System/Library/Frameworks/JavaVM.framework/Versions/${ant.java.version}/Classes/classes.jar"/> - <!-- default fallback value for compile time components on std Java --> - <property name="host.rt.jar" value="${java.home}/lib/rt.jar" /> + <!-- default value for std Java --> + <condition property="host.rt.jar" + value="${java.home}/lib/rt.jar"> + <available file="${java.home}/lib/rt.jar"/> + </condition> + <!-- default fallback value on OS X --> + <condition property="host.rt.jar" + value="/System/Library/Frameworks/JavaVM.framework/Versions/${ant.java.version}/Classes/classes.jar"> + <available file="/System/Library/Frameworks/JavaVM.framework/Versions/${ant.java.version}/Classes/classes.jar"/> + </condition> <echo message="host.sourcelevel ${host.sourcelevel}"/> <echo message="host.targetlevel ${host.targetlevel}"/> <echo message="host.rt.jar ${host.rt.jar}"/> + <fail message="No host.rt.jar specified not found."> + <condition> + <not> + <isset property="host.rt.jar"/> + </not> + </condition> + </fail> <fail message="Unsupported Target Java version (sourcelevel): ${target.sourcelevel}. Make sure that the version of the Java compiler is 1.6 (6.0) or greater."> <condition> |