From a56d7592f0f2f63a84e2159171a784026cc99986 Mon Sep 17 00:00:00 2001 From: bradford barr Date: Thu, 28 Sep 2017 17:31:41 -0400 Subject: [PATCH] TBB Debug Release OpenCV fails to detect tbb on a debug build if the platform has only installed debug libraries. This PR adds an additional check to the tbb detect logic for systems that only install tbb debug and not both tbb debug and release. --- cmake/OpenCVDetectTBB.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/OpenCVDetectTBB.cmake b/cmake/OpenCVDetectTBB.cmake index 426487a88c..9417a53dd9 100644 --- a/cmake/OpenCVDetectTBB.cmake +++ b/cmake/OpenCVDetectTBB.cmake @@ -45,7 +45,7 @@ function(ocv_tbb_env_guess _found) find_library(TBB_ENV_LIB NAMES "tbb") find_library(TBB_ENV_LIB_DEBUG NAMES "tbb_debug" PATHS ENV LIBRARY_PATH ENV LD_LIBRARY_PATH NO_DEFAULT_PATH) find_library(TBB_ENV_LIB_DEBUG NAMES "tbb_debug") - if (TBB_ENV_INCLUDE AND TBB_ENV_LIB) + if (TBB_ENV_INCLUDE AND (TBB_ENV_LIB OR TBB_ENV_LIB_DEBUG)) ocv_tbb_verify() ocv_tbb_read_version("${TBB_ENV_INCLUDE}") add_library(tbb UNKNOWN IMPORTED)