summaryrefslogtreecommitdiffstats
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
parent6754e8f22b3bf65fc06aae528d183e41e013e812 (diff)
includepath workaround for mac.
-rw-r--r--.gitignore1
-rw-r--r--build.xml19
2 files changed, 11 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 0e139952..2a23baac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,6 +2,7 @@ build
dist
gensrc
resources/includes/CL
+resources/includes/OpenCL
.idea/workspace.xml
**~
nbproject/private
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>