        NO_CMAKE_SYSTEM_PATH
  	  )
 -	FIND_LIBRARY ( TBBMALLOC_LIBRARY_PATH tbbmalloc PATHS ${TBB_LIBRARYDIR} PATH_SUFFIXES ${TBB_PATH_SUFFIXES}
-+	FIND_LIBRARY ( TBBMALLOC_LIBRARY_PATH NAMES tbbmalloc tbbmalloc_debug PATHS ${TBB_LIBRARYDIR} PATH_SUFFIXES lib ${TBB_PATH_SUFFIXES}
++	FIND_LIBRARY ( TBBMALLOC_LIBRARY_PATH NAMES tbbmalloc tbbmalloc_debug PATHS ${TBB_LIBRARYDIR} PATH_SUFFIXES ${TBB_PATH_SUFFIXES}
        NO_DEFAULT_PATH
        NO_CMAKE_ENVIRONMENT_PATH
        NO_CMAKE_PATH
 -- 
-2.9.2.windows.1
+2.8.1.windows.1
 

From 0dd7eeeb5db9ef8bf29e484fe20b3eaec62a414d Mon Sep 17 00:00:00 2001
From: Zoltan Gilian <zoltan.gilian@gmail.com>
Date: Sat, 19 Aug 2017 14:26:11 +0100
Subject: [PATCH] fix FindTBB module

---
 cmake/FindTBB.cmake | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake
index 3fe6446..1d6e4fb 100644
--- a/cmake/FindTBB.cmake
+++ b/cmake/FindTBB.cmake
@@ -79,6 +79,7 @@ IF ( TBB_FOUND )
       SET ( TBB_VC_DIR vc12 )
 	ENDIF ( MSVC10)
 	#  MESSAGE ( "TBB_VC_DIR = ${TBB_VC_DIR}" )
+	SET ( TBB_LIBRARYDIR ${TBB_LOCATION}/lib CACHE STRING "TBB library directory")
 	SET (TBB_PATH_SUFFIXES intel64/${TBB_VC_DIR} )
 	FIND_LIBRARY ( TBB_LIBRARY_PATH tbb PATHS ${TBB_LIBRARYDIR} PATH_SUFFIXES ${TBB_PATH_SUFFIXES})
 	FIND_LIBRARY ( TBB_PREVIEW_LIBRARY_PATH tbb_preview PATHS ${TBB_LIBRARYDIR}  PATH_SUFFIXES ${TBB_PATH_SUFFIXES})
@@ -102,21 +103,21 @@ IF ( TBB_FOUND )
 	ELSE ()
       MESSAGE ( FATAL_ERROR "Can't hanlde non-GCC compiler")
 	ENDIF ()
-	FIND_LIBRARY ( TBB_LIBRARY_PATH tbb PATHS ${TBB_LIBRARYDIR} PATH_SUFFIXES ${TBB_PATH_SUFFIXES}
+	FIND_LIBRARY ( TBB_LIBRARY_PATH NAMES tbb tbb_debug PATHS ${TBB_LIBRARYDIR} PATH_SUFFIXES lib ${TBB_PATH_SUFFIXES}
       NO_DEFAULT_PATH
       NO_CMAKE_ENVIRONMENT_PATH
       NO_CMAKE_PATH

       NO_CMAKE_SYSTEM_PATH
 	  )
-	FIND_LIBRARY ( TBB_PREVIEW_LIBRARY_PATH tbb_preview PATHS ${TBB_LIBRARYDIR} PATH_SUFFIXES ${TBB_PATH_SUFFIXES}
+	FIND_LIBRARY ( TBB_PREVIEW_LIBRARY_PATH NAMES tbb_preview tbb_preview_debug PATHS ${TBB_LIBRARYDIR} PATH_SUFFIXES ${TBB_PATH_SUFFIXES}
       NO_DEFAULT_PATH
       NO_CMAKE_ENVIRONMENT_PATH
       NO_CMAKE_PATH
