Fixed building with OpenCL, but without the ocl module.
authorRoman Donchenko <roman.donchenko@itseez.com>
Wed, 30 Oct 2013 10:02:08 +0000 (14:02 +0400)
committerRoman Donchenko <roman.donchenko@itseez.com>
Wed, 30 Oct 2013 10:07:34 +0000 (14:07 +0400)
HAVE_opencv_ocl implies HAVE_OPENCL, so checking for both is not
necessary.

cmake/OpenCVModule.cmake
modules/superres/perf/perf_superres_ocl.cpp
samples/gpu/CMakeLists.txt

index 024a9d9..c923aba 100644 (file)
@@ -499,7 +499,7 @@ macro(ocv_glob_module_sources)
   source_group("Src" FILES ${lib_srcs} ${lib_int_hdrs})
 
   file(GLOB cl_kernels "src/opencl/*.cl")
-  if(HAVE_OPENCL AND cl_kernels)
+  if(HAVE_opencv_ocl AND cl_kernels)
     ocv_include_directories(${OPENCL_INCLUDE_DIRS})
     add_custom_command(
       OUTPUT "${CMAKE_CURRENT_BINARY_DIR}/opencl_kernels.cpp" "${CMAKE_CURRENT_BINARY_DIR}/opencl_kernels.hpp"
index 822b87f..9a8fab4 100644 (file)
@@ -42,7 +42,7 @@
 
 #include "perf_precomp.hpp"
 
-#ifdef HAVE_OPENCL
+#ifdef HAVE_OPENCV_OCL
 
 #include "opencv2/ocl/ocl.hpp"
 using namespace std;
index 697ff93..732a917 100644 (file)
@@ -49,7 +49,7 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND)
       target_link_libraries(${the_target} opencv_nonfree)
     endif()
 
-    if(HAVE_OPENCL)
+    if(HAVE_opencv_ocl)
       target_link_libraries(${the_target} opencv_ocl)
     endif()