TBB Debug Release
authorbradford barr <bradford@density.io>
Thu, 28 Sep 2017 21:31:41 +0000 (17:31 -0400)
committerbradford barr <bradford@density.io>
Thu, 28 Sep 2017 21:31:41 +0000 (17:31 -0400)
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

index 426487a..9417a53 100644 (file)
@@ -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)