[Piglit] [PATCH] Fix discovery of OpenCL framework on MacOS.

Aaron Watry awatry at gmail.com
Tue Nov 13 18:41:56 PST 2012


Tested on Mac OS 10.7
---
 cmake/Modules/FindOpenCL.cmake |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/cmake/Modules/FindOpenCL.cmake b/cmake/Modules/FindOpenCL.cmake
index 52aa8bd..cc66714 100644
--- a/cmake/Modules/FindOpenCL.cmake
+++ b/cmake/Modules/FindOpenCL.cmake
@@ -29,8 +29,13 @@
 #   OPENCL_opencl_LIBRARY
 #       Path to OpenCL's library.
 
-find_path(OPENCL_INCLUDE_PATH CL/opencl.h)
-find_library(OPENCL_opencl_LIBRARY OpenCL)
+  if (APPLE)
+    find_path(OPENCL_INCLUDE_PATH OpenCL/cl.h)
+  else()
+    find_path(OPENCL_INCLUDE_PATH CL/opencl.h)
+  endif()
+
+  find_library(OPENCL_opencl_LIBRARY OpenCL)
 
 include(FindPackageHandleStandardArgs)
 FIND_PACKAGE_HANDLE_STANDARD_ARGS(OpenCL
-- 
1.7.4.4



More information about the Piglit mailing list