Browse Source

OpenCL on Mac uses a different header.. (https://trac.osgeo.org/grass/ticket/1446)

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@55958 15284696-431f-4ddb-bdfa-cd5b030d7da7
Hamish Bowman 12 years ago
parent
commit
650af91d50
2 changed files with 11 additions and 2 deletions
  1. 6 1
      configure.in
  2. 5 1
      raster/r.sun/main.c

+ 6 - 1
configure.in

@@ -1765,7 +1765,12 @@ if test -n "$USE_OPENCL"; then
 # With OpenCL includes directory
 
 LOC_CHECK_INC_PATH(opencl,OpenCL,OCLINCPATH)
-LOC_CHECK_INCLUDES(CL/cl.h,OpenCL,$OCLINCPATH)
+
+if test -n "$MACOSX_APP" ; then
+    LOC_CHECK_INCLUDES(OpenCL/opencl.h,OpenCL,$OCLINCPATH)
+else
+    LOC_CHECK_INCLUDES(CL/cl.h,OpenCL,$OCLINCPATH)
+fi
 
 # With OpenCL library directory
 

+ 5 - 1
raster/r.sun/main.c

@@ -34,7 +34,11 @@ email: hofierka@geomodel.sk,marcel.suri@jrc.it,suri@geomodel.sk Thomas.Huld@jrc.
 #include <stdlib.h>
 #include <math.h>
 #ifdef USE_OPENCL
-#include <CL/cl.h>
+  #ifdef __APPLE__
+    #include <OpenCL/opencl.h>
+  #else
+    #include <CL/cl.h>
+  #endif
 #endif
 
 #include <grass/gis.h>