1 line
7.9 KiB
XML
1 line
7.9 KiB
XML
|
<project name="OS X Native code" basedir="../../bin/lwjgl" default="nativelibrary">
<property name="native" location="../../src/native"/>
<target name="init">
<mkdir dir="i386"/>
<mkdir dir="x86_64"/>
<property environment="env" />
<!-- Check which gcc we have, newer releasse of Mac OS do not have gcc-4.2 installed by defaault -->
<available file="gcc" filepath="${env.PATH}" property="gcc.name" value="gcc"/>
<available file="gcc-4.2" filepath="${env.PATH}" property="gcc42.name" value="gcc-4.2"/>
<condition property="gcc" value="${gcc42.name}" else="${gcc.name}">
<isset property="gcc42.name" />
</condition>
<!-- Ask Xcode for correct path to XCode tools -->
<!-- Will fail if XCode Command Line Tools are not installed on 10.7+ (Lion) -->
<exec executable="xcode-select" outputproperty="developer_path" errorproperty="xcode-select.error" failonerror="false" failifexecutionfails="false">
<arg value="-print-path" />
</exec>
<!-- Default to /Developer if xcode-select fails -->
<condition property="developer_path" value="/Developer">
<isset property="xcode-select.error" />
</condition>
<!-- Detect Mac OS X 10.7 SDK in new Xcode path for for Mac OS 10.7+ -->
<condition property="sdk-10.7" value="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk">
<available file="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk" type="dir"/>
</condition>
<condition property="javavm-10.7" value="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk">
<available file="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers" type="dir"/>
</condition>
<!-- Detect Mac OS X 10.6 SDK copied into new Xcode path for Mac OS 10.7+ -->
<condition property="sdk-10.6" value="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk">
<available file="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk" type="dir"/>
</condition>
<condition property="javavm-10.6" value="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk">
<available file="${developer_path}/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers" type="dir"/>
</condition>
<!-- Detect Mac OS X 10.6 SDK in old XCode location for Mac OS 10.6 -->
<condition property="old.sdk-10.6" value="${developer_path}/SDKs/MacOSx10.6.sdk">
<available file="${developer_path}/SDKs/MacOSx10.6.sdk" type="dir"/>
</condition>
<condition property="old.javavm-10.6" value="">
<available file="/System/Library/Frameworks/JavaVM.framework/Versions/A/Headers" type="dir"/>
</condition>
<!-- Use old JavaVM.framework location if nothing else is available -->
<condition property="javavmroot" value="${old.javavm-10.6}">
<and>
<isset property="old.javavm-10.6" />
<not>
<or>
<isset property="javavm-10.6" />
<isset property="javavm-10.7" />
</or>
</not>
</and>
</condition>
<!-- Use JavaVM.framework from 10.6 in new Xcode path if available -->
<condition property="javavmroot" value="${javavm-10.6}">
<isset property="javavm-10.6" />
</condition>
<!-- Use JavaVM.framework from 10.7 in new Xcode path if available and 10.6 isn't also there -->
<condition property="javavmroot" value="${javavm-10.7}">
<and>
<isset property="javavm-10.7" />
<not>
<isset property="javavm-10.6" />
</not>
</and>
</condition>
<!-- Use MacOS SDK 10.6 from /Developer if nothing else is available -->
<condition property="sdkroot" value="${old.sdk-10.6}">
<and>
<isset property="old.sdk-10.6" />
<not>
<or>
<isset property="sdk-10.6" />
<isset property="sdk-10.7" />
</or>
</not>
</and>
</condition>
<!-- Use MacOS SDK 10.6 from new Xcode location if available -->
<condition property="sdkroot" value="${sdk-10.6}">
<isset property="sdk-10.6" />
</condition>
<!-- Use MacOS SD
|