From 88a7e8cdf543dbe3616ac4946962210421f0eb03 Mon Sep 17 00:00:00 2001 From: souch Date: Tue, 11 Apr 2023 09:14:55 +0200 Subject: [PATCH] Merge pull request #23417 from souch:souch-fix-parallel-backend-example fix cmakelists of parallel backend example closes https://github.com/opencv/opencv/issues/23376 --- .../cpp/tutorial_code/core/parallel_backend/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/cpp/tutorial_code/core/parallel_backend/CMakeLists.txt b/samples/cpp/tutorial_code/core/parallel_backend/CMakeLists.txt index 857d9b76ef..1c8c8412a9 100644 --- a/samples/cpp/tutorial_code/core/parallel_backend/CMakeLists.txt +++ b/samples/cpp/tutorial_code/core/parallel_backend/CMakeLists.txt @@ -5,9 +5,9 @@ find_package(OpenCV REQUIRED COMPONENTS opencv_core) if(NOT OPENCV_EXAMPLES_SKIP_PARALLEL_BACKEND_OPENMP AND NOT OPENCV_EXAMPLES_SKIP_OPENMP ) + project(opencv_example_openmp_backend) find_package(OpenMP) if(OpenMP_FOUND) - project(opencv_example_openmp_backend) add_executable(opencv_example_openmp_backend example-openmp.cpp) target_link_libraries(opencv_example_openmp_backend PRIVATE opencv_core @@ -20,13 +20,13 @@ if(NOT OPENCV_EXAMPLES_SKIP_PARALLEL_BACKEND_TBB AND NOT OPENCV_EXAMPLES_SKIP_TBB AND NOT OPENCV_EXAMPLE_SKIP_TBB # deprecated (to be removed in OpenCV 5.0) ) + project(opencv_example_tbb_backend) find_package(TBB QUIET) if(NOT TBB_FOUND) find_path(TBB_INCLUDE_DIR NAMES "tbb/tbb.h") find_library(TBB_LIBRARY NAMES "tbb") endif() if(TBB_INCLUDE_DIR AND TBB_LIBRARY) - project(opencv_example_tbb_backend) add_executable(opencv_example_tbb_backend example-tbb.cpp) target_include_directories(opencv_example_tbb_backend SYSTEM PRIVATE ${TBB_INCLUDE_DIR}) target_link_libraries(opencv_example_tbb_backend PRIVATE