Skip to content

Commit

Permalink
includepath workaround for mac.
Browse files Browse the repository at this point in the history
  • Loading branch information
mbien committed Aug 8, 2010
1 parent 6754e8f commit 105c4d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 9 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ build
dist
gensrc
resources/includes/CL
resources/includes/OpenCL
.idea/workspace.xml
**~
nbproject/private
19 changes: 10 additions & 9 deletions build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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" />

Expand Down Expand Up @@ -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"/>
Expand Down Expand Up @@ -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>
Expand Down

0 comments on commit 105c4d0

Please sign in to comment.