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

tom at stellard.net tom at stellard.net
Wed Nov 14 14:01:20 PST 2012


On 2012-11-14 02:41, Aaron Watry wrote:
> Tested on Mac OS 10.7
> ---

Reviewed-by: Tom Stellard <thomas.stellard at amd.com>

>  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



More information about the Piglit mailing list