[Piglit] [PATCH] Modify the FindOpenCL.make to add the CL lib name

junyan.he at linux.intel.com junyan.he at linux.intel.com
Tue May 14 23:57:53 PDT 2013

From: Junyan He <junyan.he at linux.intel.com>

Some OpenCL lib's name is not libOpenCL.so.
Some thing like libCL.so, libcl.so may exist,
and in these cases the check failed.
Add the names to fix this problem.

Signed-off-by: Junyan He <junyan.he at linux.intel.com>
 cmake/Modules/FindOpenCL.cmake |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cmake/Modules/FindOpenCL.cmake b/cmake/Modules/FindOpenCL.cmake
index cc66714..121dcf2 100644
--- a/cmake/Modules/FindOpenCL.cmake
+++ b/cmake/Modules/FindOpenCL.cmake
@@ -35,7 +35,8 @@
     find_path(OPENCL_INCLUDE_PATH CL/opencl.h)
-  find_library(OPENCL_opencl_LIBRARY OpenCL)
+  find_library(OPENCL_opencl_LIBRARY
+      NAMES OpenCL CL cl)

More information about the Piglit mailing list