diff --git a/cmake/OpenCVPackaging.cmake b/cmake/OpenCVPackaging.cmake index 732eae9e4e..3d63c09fa9 100644 --- a/cmake/OpenCVPackaging.cmake +++ b/cmake/OpenCVPackaging.cmake @@ -64,7 +64,7 @@ set(CPACK_DEBIAN_PACKAGE_HOMEPAGE "http://opencv.org") #depencencies set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS TRUE) -set(CPACK_COMPONENT_samples_DEPENDS libs) +set(CPACK_COMPONENT_samples_DEPENDS libs dev) set(CPACK_COMPONENT_dev_DEPENDS libs) set(CPACK_COMPONENT_docs_DEPENDS libs) set(CPACK_COMPONENT_java_DEPENDS libs) diff --git a/samples/CMakeLists.txt b/samples/CMakeLists.txt index 48a419d75c..659ab058c1 100644 --- a/samples/CMakeLists.txt +++ b/samples/CMakeLists.txt @@ -19,6 +19,9 @@ if(ANDROID AND BUILD_ANDROID_EXAMPLES) add_subdirectory(android) endif() +install(FILES "CMakeLists.txt" + DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH} + PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples) # # END OF BUILD CASE 1: Build samples with library sources @@ -60,7 +63,7 @@ endif() add_subdirectory(c) add_subdirectory(cpp) add_subdirectory(ocl) -# FIXIT: can't use cvconfig.h in samples: add_subdirectory(gpu) +add_subdirectory(gpu) # # END OF BUILD CASE 2: Build samples with library binaries diff --git a/samples/c/CMakeLists.txt b/samples/c/CMakeLists.txt index 6d374e7443..61f23666f3 100644 --- a/samples/c/CMakeLists.txt +++ b/samples/c/CMakeLists.txt @@ -51,8 +51,8 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) endforeach() endif() -if (INSTALL_C_EXAMPLES AND NOT WIN32) - file(GLOB C_SAMPLES *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd ) +if (OCV_DEPENDENCIES_FOUND AND INSTALL_C_EXAMPLES AND NOT WIN32) + file(GLOB C_SAMPLES *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd *.txt) install(FILES ${C_SAMPLES} DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/c PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples) diff --git a/samples/c/latentsvmdetect.cpp b/samples/c/latentsvmdetect.cpp index e74b227a62..92e237a24a 100644 --- a/samples/c/latentsvmdetect.cpp +++ b/samples/c/latentsvmdetect.cpp @@ -2,13 +2,6 @@ #include "opencv2/highgui/highgui.hpp" #include -#ifdef HAVE_CVCONFIG_H -#include -#endif -#ifdef HAVE_TBB -#include "tbb/task_scheduler_init.h" -#endif - using namespace cv; static void help() @@ -31,28 +24,13 @@ static void detect_and_draw_objects( IplImage* image, CvLatentSvmDetector* detec CvSeq* detections = 0; int i = 0; int64 start = 0, finish = 0; -#ifdef HAVE_TBB - tbb::task_scheduler_init init(tbb::task_scheduler_init::deferred); - if (numThreads > 0) - { - init.initialize(numThreads); - printf("Number of threads %i\n", numThreads); - } - else - { - printf("Number of threads is not correct for TBB version"); - return; - } -#endif + cv::setNumThreads(numThreads); start = cvGetTickCount(); detections = cvLatentSvmDetectObjects(image, detector, storage, 0.5f, numThreads); finish = cvGetTickCount(); printf("detection time = %.3f\n", (float)(finish - start) / (float)(cvGetTickFrequency() * 1000000.0)); -#ifdef HAVE_TBB - init.terminate(); -#endif for( i = 0; i < detections->total; i++ ) { CvObjectDetection detection = *(CvObjectDetection*)cvGetSeqElem( detections, i ); diff --git a/samples/cpp/CMakeLists.txt b/samples/cpp/CMakeLists.txt index 1f55ed90f3..65e402bc13 100644 --- a/samples/cpp/CMakeLists.txt +++ b/samples/cpp/CMakeLists.txt @@ -90,8 +90,8 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) endforeach() endif() -if (INSTALL_C_EXAMPLES AND NOT WIN32) - file(GLOB C_SAMPLES *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd ) +if (OCV_DEPENDENCIES_FOUND AND INSTALL_C_EXAMPLES AND NOT WIN32) + file(GLOB C_SAMPLES *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd *.txt) install(FILES ${C_SAMPLES} DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/cpp PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples) diff --git a/samples/cpp/latentsvm_multidetect.cpp b/samples/cpp/latentsvm_multidetect.cpp index 37297e23de..de368eab5d 100644 --- a/samples/cpp/latentsvm_multidetect.cpp +++ b/samples/cpp/latentsvm_multidetect.cpp @@ -9,14 +9,6 @@ #include #endif -#ifdef HAVE_CVCONFIG_H -#include -#endif - -#ifdef HAVE_TBB -#include "tbb/task_scheduler_init.h" -#endif - using namespace std; using namespace cv; diff --git a/samples/gpu/CMakeLists.txt b/samples/gpu/CMakeLists.txt index d25c3a6b5d..dc7464f942 100644 --- a/samples/gpu/CMakeLists.txt +++ b/samples/gpu/CMakeLists.txt @@ -69,8 +69,28 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) endif() ENDMACRO() + # remove all matching elements from the list + MACRO(list_filterout lst regex) + foreach(item ${${lst}}) + if(item MATCHES "${regex}") + list(REMOVE_ITEM ${lst} "${item}") + endif() + endforeach() + ENDMACRO() + file(GLOB all_samples RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp) + if(NOT HAVE_OPENGL) + list(REMOVE_ITEM all_samples "opengl.cpp") + endif() + + if(NOT HAVE_CUDA) + list(REMOVE_ITEM all_samples "opticalflow_nvidia_api.cpp") + list(REMOVE_ITEM all_samples "cascadeclassifier_nvidia_api.cpp") + list(REMOVE_ITEM all_samples "driver_api_multi.cpp") + list(REMOVE_ITEM all_samples "driver_api_stereo_multi.cpp") + endif() + foreach(sample_filename ${all_samples}) get_filename_component(sample ${sample_filename} NAME_WE) file(GLOB sample_srcs RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} ${sample}.*) @@ -80,8 +100,17 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) include("performance/CMakeLists.txt") endif() -if (INSTALL_C_EXAMPLES AND NOT WIN32) - file(GLOB install_list *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd ) +if (OCV_DEPENDENCIES_FOUND AND INSTALL_C_EXAMPLES AND NOT WIN32) + file(GLOB install_list *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd *.txt) + if(NOT HAVE_OPENGL) + list_filterout(install_list ".*opengl.cpp") + endif() + if(NOT HAVE_CUDA) + list_filterout(install_list ".*opticalflow_nvidia_api.cpp") + list_filterout(install_list ".*cascadeclassifier_nvidia_api.cpp") + list_filterout(install_list ".*driver_api_multi.cpp") + list_filterout(install_list ".*driver_api_stereo_multi.cpp") + endif() install(FILES ${install_list} DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/gpu PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples) diff --git a/samples/gpu/brox_optical_flow.cpp b/samples/gpu/brox_optical_flow.cpp index 7cd5089b41..ecbd4d9fa2 100644 --- a/samples/gpu/brox_optical_flow.cpp +++ b/samples/gpu/brox_optical_flow.cpp @@ -3,7 +3,6 @@ #include #include -#include "cvconfig.h" #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/gpu/gpu.hpp" diff --git a/samples/gpu/cascadeclassifier_nvidia_api.cpp b/samples/gpu/cascadeclassifier_nvidia_api.cpp index 98195b35c2..87258b9a05 100644 --- a/samples/gpu/cascadeclassifier_nvidia_api.cpp +++ b/samples/gpu/cascadeclassifier_nvidia_api.cpp @@ -2,39 +2,24 @@ #pragma warning( disable : 4201 4408 4127 4100) #endif -#include "cvconfig.h" #include #include #include #include "opencv2/gpu/gpu.hpp" #include "opencv2/highgui/highgui.hpp" - -#ifdef HAVE_CUDA #include "NCVHaarObjectDetection.hpp" -#endif using namespace std; using namespace cv; - -#if !defined(HAVE_CUDA) || defined(__arm__) - -int main( int, const char** ) -{ -#if !defined(HAVE_CUDA) - std::cout << "CUDA support is required (CMake key 'WITH_CUDA' must be true)." << std::endl; -#endif - #if defined(__arm__) +int main() +{ std::cout << "Unsupported for ARM CUDA library." << std::endl; -#endif - return 0; } - #else - const Size2i preferredVideoFrameSize(640, 480); const string wndTitle = "NVIDIA Computer Vision :: Haar Classifiers Cascade"; @@ -386,4 +371,4 @@ int main(int argc, const char** argv) return 0; } -#endif //!defined(HAVE_CUDA) +#endif diff --git a/samples/gpu/driver_api_multi.cpp b/samples/gpu/driver_api_multi.cpp index c829830e72..4f5231c32d 100644 --- a/samples/gpu/driver_api_multi.cpp +++ b/samples/gpu/driver_api_multi.cpp @@ -7,56 +7,101 @@ #endif #include -#include "cvconfig.h" #include "opencv2/core/core.hpp" #include "opencv2/gpu/gpu.hpp" -#if !defined(HAVE_CUDA) || !defined(HAVE_TBB) || defined(__arm__) - +#if defined(__arm__) int main() { -#if !defined(HAVE_CUDA) - std::cout << "CUDA support is required (CMake key 'WITH_CUDA' must be true).\n"; -#endif - -#if !defined(HAVE_TBB) - std::cout << "TBB support is required (CMake key 'WITH_TBB' must be true).\n"; -#endif - -#if defined(__arm__) std::cout << "Unsupported for ARM CUDA library." << std::endl; -#endif - return 0; } - #else #include #include -#include "opencv2/core/internal.hpp" // For TBB wrappers using namespace std; using namespace cv; using namespace cv::gpu; -struct Worker { void operator()(int device_id) const; }; -void destroyContexts(); - #define safeCall(expr) safeCall_(expr, #expr, __FILE__, __LINE__) inline void safeCall_(int code, const char* expr, const char* file, int line) { if (code != CUDA_SUCCESS) { std::cout << "CUDA driver API error: code " << code << ", expr " << expr - << ", file " << file << ", line " << line << endl; - destroyContexts(); + << ", file " << file << ", line " << line << endl; exit(-1); } } -// Each GPU is associated with its own context -CUcontext contexts[2]; +struct Worker: public ParallelLoopBody +{ + Worker(int num_devices) + { + count = num_devices; + contexts = new CUcontext[num_devices]; + for (int device_id = 0; device_id < num_devices; device_id++) + { + CUdevice device; + safeCall(cuDeviceGet(&device, device_id)); + safeCall(cuCtxCreate(&contexts[device_id], 0, device)); + } + } + + virtual void operator() (const Range& range) const + { + for (int device_id = range.start; device_id != range.end; ++device_id) + { + // Set the proper context + safeCall(cuCtxPushCurrent(contexts[device_id])); + + Mat src(1000, 1000, CV_32F); + Mat dst; + + RNG rng(0); + rng.fill(src, RNG::UNIFORM, 0, 1); + + // CPU works + transpose(src, dst); + + // GPU works + GpuMat d_src(src); + GpuMat d_dst; + transpose(d_src, d_dst); + + // Check results + bool passed = norm(dst - Mat(d_dst), NORM_INF) < 1e-3; + std::cout << "GPU #" << device_id << " (" << DeviceInfo().name() << "): " + << (passed ? "passed" : "FAILED") << endl; + + // Deallocate data here, otherwise deallocation will be performed + // after context is extracted from the stack + d_src.release(); + d_dst.release(); + + CUcontext prev_context; + safeCall(cuCtxPopCurrent(&prev_context)); + } + } + + ~Worker() + { + if ((contexts != NULL) && count != 0) + { + for (int device_id = 0; device_id < count; device_id++) + { + safeCall(cuCtxDestroy(contexts[device_id])); + } + + delete[] contexts; + } + } + + CUcontext* contexts; + int count; +}; int main() { @@ -84,67 +129,10 @@ int main() // Init CUDA Driver API safeCall(cuInit(0)); - // Create context for GPU #0 - CUdevice device; - safeCall(cuDeviceGet(&device, 0)); - safeCall(cuCtxCreate(&contexts[0], 0, device)); - - CUcontext prev_context; - safeCall(cuCtxPopCurrent(&prev_context)); - - // Create context for GPU #1 - safeCall(cuDeviceGet(&device, 1)); - safeCall(cuCtxCreate(&contexts[1], 0, device)); - - safeCall(cuCtxPopCurrent(&prev_context)); + // Execute calculation + parallel_for_(cv::Range(0, num_devices), Worker(num_devices)); - // Execute calculation in two threads using two GPUs - int devices[] = {0, 1}; - parallel_do(devices, devices + 2, Worker()); - - destroyContexts(); return 0; } - -void Worker::operator()(int device_id) const -{ - // Set the proper context - safeCall(cuCtxPushCurrent(contexts[device_id])); - - Mat src(1000, 1000, CV_32F); - Mat dst; - - RNG rng(0); - rng.fill(src, RNG::UNIFORM, 0, 1); - - // CPU works - transpose(src, dst); - - // GPU works - GpuMat d_src(src); - GpuMat d_dst; - transpose(d_src, d_dst); - - // Check results - bool passed = norm(dst - Mat(d_dst), NORM_INF) < 1e-3; - std::cout << "GPU #" << device_id << " (" << DeviceInfo().name() << "): " - << (passed ? "passed" : "FAILED") << endl; - - // Deallocate data here, otherwise deallocation will be performed - // after context is extracted from the stack - d_src.release(); - d_dst.release(); - - CUcontext prev_context; - safeCall(cuCtxPopCurrent(&prev_context)); -} - - -void destroyContexts() -{ - safeCall(cuCtxDestroy(contexts[0])); - safeCall(cuCtxDestroy(contexts[1])); -} - #endif diff --git a/samples/gpu/driver_api_stereo_multi.cpp b/samples/gpu/driver_api_stereo_multi.cpp index d4d0af451c..507203f858 100644 --- a/samples/gpu/driver_api_stereo_multi.cpp +++ b/samples/gpu/driver_api_stereo_multi.cpp @@ -8,30 +8,16 @@ #endif #include -#include "cvconfig.h" #include "opencv2/core/core.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/gpu/gpu.hpp" -#if !defined(HAVE_CUDA) || !defined(HAVE_TBB) || defined(__arm__) - +#if defined(__arm__) int main() { -#if !defined(HAVE_CUDA) - std::cout << "CUDA support is required (CMake key 'WITH_CUDA' must be true).\n"; -#endif - -#if !defined(HAVE_TBB) - std::cout << "TBB support is required (CMake key 'WITH_TBB' must be true).\n"; -#endif - -#if defined(__arm__) std::cout << "Unsupported for ARM CUDA library." << std::endl; -#endif - return 0; } - #else #include @@ -42,7 +28,6 @@ using namespace std; using namespace cv; using namespace cv::gpu; -struct Worker { void operator()(int device_id) const; }; void destroyContexts(); #define safeCall(expr) safeCall_(expr, #expr, __FILE__, __LINE__) @@ -77,6 +62,27 @@ GpuMat d_right[2]; StereoBM_GPU* bm[2]; GpuMat d_result[2]; + +struct Worker: public ParallelLoopBody +{ + virtual void operator() (const Range& range) const + { + for (int device_id = range.start; device_id != range.end; ++device_id) + { + contextOn(device_id); + + bm[device_id]->operator()(d_left[device_id], d_right[device_id], + d_result[device_id]); + + std::cout << "GPU #" << device_id << " (" << DeviceInfo().name() + << "): finished\n"; + + contextOff(); + + } + } +}; + static void printHelp() { std::cout << "Usage: driver_api_stereo_multi_gpu --left --right \n"; @@ -162,8 +168,7 @@ int main(int argc, char** argv) contextOff(); // Execute calculation in two threads using two GPUs - int devices[] = {0, 1}; - parallel_do(devices, devices + 2, Worker()); + parallel_for_(cv::Range(0, 2), Worker()); // Release the first GPU resources contextOn(0); @@ -188,21 +193,6 @@ int main(int argc, char** argv) return 0; } - -void Worker::operator()(int device_id) const -{ - contextOn(device_id); - - bm[device_id]->operator()(d_left[device_id], d_right[device_id], - d_result[device_id]); - - std::cout << "GPU #" << device_id << " (" << DeviceInfo().name() - << "): finished\n"; - - contextOff(); -} - - void destroyContexts() { safeCall(cuCtxDestroy(contexts[0])); diff --git a/samples/gpu/multi.cpp b/samples/gpu/multi.cpp index c3925fc442..ddb512f6fc 100644 --- a/samples/gpu/multi.cpp +++ b/samples/gpu/multi.cpp @@ -7,34 +7,47 @@ #endif #include -#include "cvconfig.h" #include "opencv2/core/core.hpp" #include "opencv2/gpu/gpu.hpp" -#if !defined(HAVE_CUDA) || !defined(HAVE_TBB) +using namespace std; +using namespace cv; +using namespace cv::gpu; -int main() +struct Worker: public ParallelLoopBody { -#if !defined(HAVE_CUDA) - std::cout << "CUDA support is required (CMake key 'WITH_CUDA' must be true).\n"; -#endif + virtual void operator() (const Range& range) const + { + for (int device_id = range.start; device_id != range.end; ++device_id) + { + setDevice(device_id); -#if !defined(HAVE_TBB) - std::cout << "TBB support is required (CMake key 'WITH_TBB' must be true).\n"; -#endif + Mat src(1000, 1000, CV_32F); + Mat dst; - return 0; -} + RNG rng(0); + rng.fill(src, RNG::UNIFORM, 0, 1); -#else + // CPU works + transpose(src, dst); -#include "opencv2/core/internal.hpp" // For TBB wrappers + // GPU works + GpuMat d_src(src); + GpuMat d_dst; + transpose(d_src, d_dst); -using namespace std; -using namespace cv; -using namespace cv::gpu; + // Check results + bool passed = norm(dst - Mat(d_dst), NORM_INF) < 1e-3; + std::cout << "GPU #" << device_id << " (" << DeviceInfo().name() << "): " + << (passed ? "passed" : "FAILED") << endl; -struct Worker { void operator()(int device_id) const; }; + // Deallocate data here, otherwise deallocation will be performed + // after context is extracted from the stack + d_src.release(); + d_dst.release(); + } + } +}; int main() { @@ -58,41 +71,8 @@ int main() } } - // Execute calculation in two threads using two GPUs - int devices[] = {0, 1}; - parallel_do(devices, devices + 2, Worker()); + // Execute calculation in several threads, 1 GPU per thread + parallel_for_(cv::Range(0, num_devices), Worker()); return 0; } - - -void Worker::operator()(int device_id) const -{ - setDevice(device_id); - - Mat src(1000, 1000, CV_32F); - Mat dst; - - RNG rng(0); - rng.fill(src, RNG::UNIFORM, 0, 1); - - // CPU works - transpose(src, dst); - - // GPU works - GpuMat d_src(src); - GpuMat d_dst; - transpose(d_src, d_dst); - - // Check results - bool passed = norm(dst - Mat(d_dst), NORM_INF) < 1e-3; - std::cout << "GPU #" << device_id << " (" << DeviceInfo().name() << "): " - << (passed ? "passed" : "FAILED") << endl; - - // Deallocate data here, otherwise deallocation will be performed - // after context is extracted from the stack - d_src.release(); - d_dst.release(); -} - -#endif diff --git a/samples/gpu/opengl.cpp b/samples/gpu/opengl.cpp index 5b84a5bef5..d90a6658ec 100644 --- a/samples/gpu/opengl.cpp +++ b/samples/gpu/opengl.cpp @@ -1,13 +1,4 @@ #include -#include "cvconfig.h" - -#ifndef HAVE_OPENGL -int main() -{ - std::cerr << "Library was built without OpenGL support" << std::endl; - return -1; -} -#else #ifdef WIN32 #define WIN32_LEAN_AND_MEAN 1 diff --git a/samples/gpu/opticalflow_nvidia_api.cpp b/samples/gpu/opticalflow_nvidia_api.cpp index 31ee569788..d0b071f64c 100644 --- a/samples/gpu/opticalflow_nvidia_api.cpp +++ b/samples/gpu/opticalflow_nvidia_api.cpp @@ -9,26 +9,14 @@ #include #include -#include "cvconfig.h" #include #include #include "opencv2/gpu/gpu.hpp" #include "opencv2/highgui/highgui.hpp" -#ifdef HAVE_CUDA #include "NPP_staging/NPP_staging.hpp" #include "NCVBroxOpticalFlow.hpp" -#endif - -#if !defined(HAVE_CUDA) -int main( int, const char** ) -{ - std::cout << "Please compile the library with CUDA support" << std::endl; - return -1; -} -#else -//using std::tr1::shared_ptr; using cv::Ptr; #define PARAM_LEFT "--left" @@ -649,5 +637,3 @@ int main(int argc, char **argv) return 0; } - -#endif diff --git a/samples/gpu/performance/CMakeLists.txt b/samples/gpu/performance/CMakeLists.txt index de0feadd26..4a1603a916 100644 --- a/samples/gpu/performance/CMakeLists.txt +++ b/samples/gpu/performance/CMakeLists.txt @@ -27,7 +27,7 @@ if(WIN32) endif() if(INSTALL_C_EXAMPLES AND NOT WIN32) - file(GLOB GPU_FILES performance/*.cpp performance/*.h) + file(GLOB GPU_FILES performance/*.cpp performance/*.h performance/CMakeLists.txt) install(FILES ${GPU_FILES} DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/gpu/performance PERMISSIONS OWNER_READ GROUP_READ WORLD_READ diff --git a/samples/gpu/pyrlk_optical_flow.cpp b/samples/gpu/pyrlk_optical_flow.cpp index 5ccd66009b..1c3eb20a95 100644 --- a/samples/gpu/pyrlk_optical_flow.cpp +++ b/samples/gpu/pyrlk_optical_flow.cpp @@ -1,7 +1,6 @@ #include #include -#include "cvconfig.h" #include "opencv2/core/core.hpp" #include "opencv2/imgproc/imgproc.hpp" #include "opencv2/highgui/highgui.hpp" diff --git a/samples/ocl/CMakeLists.txt b/samples/ocl/CMakeLists.txt index 7fc20fd356..10db9b10fb 100644 --- a/samples/ocl/CMakeLists.txt +++ b/samples/ocl/CMakeLists.txt @@ -51,8 +51,8 @@ if(BUILD_EXAMPLES AND OCV_DEPENDENCIES_FOUND) endforeach() endif() -if (INSTALL_C_EXAMPLES AND NOT WIN32) - file(GLOB install_list *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd ) +if (OCV_DEPENDENCIES_FOUND AND INSTALL_C_EXAMPLES AND NOT WIN32) + file(GLOB install_list *.c *.cpp *.jpg *.png *.data makefile.* build_all.sh *.dsp *.cmd *.txt) install(FILES ${install_list} DESTINATION ${OPENCV_SAMPLES_SRC_INSTALL_PATH}/ocl PERMISSIONS OWNER_READ GROUP_READ WORLD_READ COMPONENT samples)