Commit ef1d4eba authored by Vadim Pisarevsky's avatar Vadim Pisarevsky

Merge pull request #5241 from alalek:fix_sample_opencl

parents edcd2c04 1b1246cb
...@@ -18,7 +18,11 @@ ocv_check_dependencies(${OPENCV_OPENCL_SAMPLES_REQUIRED_DEPS}) ...@@ -18,7 +18,11 @@ ocv_check_dependencies(${OPENCV_OPENCL_SAMPLES_REQUIRED_DEPS})
if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
find_package(OpenCL 1.2 REQUIRED) find_package(OpenCL 1.2 QUIET)
if(NOT OpenCL_FOUND)
message(STATUS "OpenCL samples are skipped: OpenCL SDK is required")
return()
endif()
set(project "opencl") set(project "opencl")
string(TOUPPER "${project}" project_upper) string(TOUPPER "${project}" project_upper)
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include <iomanip> #include <iomanip>
#include <stdexcept> #include <stdexcept>
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS // eliminate build warning
#if __APPLE__ #if __APPLE__
#include <OpenCL/cl.h> #include <OpenCL/cl.h>
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment