Commit 1b1246cb authored by Alexander Alekhin's avatar Alexander Alekhin

samples: fix OpenCL detection / build warning

parent c385ac57
......@@ -18,7 +18,11 @@ ocv_check_dependencies(${OPENCV_OPENCL_SAMPLES_REQUIRED_DEPS})
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")
string(TOUPPER "${project}" project_upper)
......
......@@ -14,6 +14,8 @@
#include <iomanip>
#include <stdexcept>
#define CL_USE_DEPRECATED_OPENCL_2_0_APIS // eliminate build warning
#if __APPLE__
#include <OpenCL/cl.h>
#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