Merge pull request #5241 from alalek:fix_sample_opencl
This commit is contained in:
commit
ef1d4eba84
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user