summaryrefslogtreecommitdiffstats
path: root/build.xml
diff options
context:
space:
mode:
authorMichael Bien <[email protected]>2010-08-08 22:02:42 +0200
committerMichael Bien <[email protected]>2010-08-08 22:02:42 +0200
commit105c4d0901eb05439347b3f4d78bb674dbce8d39 (patch)
tree44536ca04c576e01d190253dc3649a246d91ab1c /build.xml
parent6754e8f22b3bf65fc06aae528d183e41e013e812 (diff)
includepath workaround for mac.
Diffstat (limited to 'build.xml')
-rw-r--r--build.xml19
1 files changed, 10 insertions, 9 deletions
diff --git a/build.xml b/build.xml
index 8dd4458c..1fc62e2f 100644
--- a/build.xml
+++ b/build.xml
@@ -7,14 +7,9 @@
<property file="${user.home}/jocl.properties"/>
- <condition property="rootrel.build" value="build">
- <not>
- <isset property="rootrel.build"/>
- </not>
- </condition>
-
<import file="nbproject/build-impl.xml"/>
+ <property name="rootrel.build" value="build"/>
<property name="gluegen.root" value="../gluegen" />
<property name="jogl.root" value="../jogl" />
@@ -165,7 +160,14 @@
</target>
- <target name="c.setup.build" depends="gluegen.cpptasks.configure.compiler, gluegen.cpptasks.declare.compiler, c.configure.default, jocl.configure.linker">
+ <!-- official OpenCL headers expect a different layout on mac...
+ since we want to use the same headers for all platforms we move them a bit around -->
+ <target name="mac.includepath.hack" if="isOSX">
+ <delete dir="${basedir}/resources/includes/OpenCL" quiet="true"/>
+ <copydir src="${basedir}/resources/includes/CL" dest="${basedir}/resources/includes/OpenCL"/>
+ </target>
+
+ <target name="c.setup.build" depends="gluegen.cpptasks.configure.compiler, gluegen.cpptasks.declare.compiler, c.configure.default, jocl.configure.linker, mac.includepath.hack">
<property name="obj.dir" value="${build.dir}/obj"/>
<property name="natives.dir" value="${build.dir}/natives"/>
@@ -204,8 +206,7 @@
</linker>
<linker id="linker.cfg.macosx.jocl" extends="linker.cfg.macosx">
- <linkerarg value="-framework" />
- <linkerarg value="OpenCL" />
+ <linkerarg value="-framework OpenCL" if="static.binding"/>
</linker>
</target>