From 69d87d2de35ce705dad0da3d82bc04b9759ca88c Mon Sep 17 00:00:00 2001 From: Alex Cunningham Date: Tue, 6 Aug 2013 17:50:45 +0000 Subject: [PATCH] Added fix for issue with TBB library finding (with Richard) --- CMakeLists.txt | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0f47331f2..24fe0ef5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -166,12 +166,16 @@ set(ENV{TBB_TARGET_ARCH} intel64) set(ENV{TBB_TARGET_VS} vc11) find_package(TBB REQUIRED) set(TBB_LIBS "") -foreach(lib ${TBB_LIBRARIES}) - list(APPEND TBB_LIBS optimized "${lib}") -endforeach() -foreach(lib ${TBB_DEBUG_LIBRARIES}) - list(APPEND TBB_LIBS debug "${lib}") -endforeach() +if(TBB_DEBUG_LIBRARIES) + foreach(lib ${TBB_LIBRARIES}) + list(APPEND TBB_LIBS optimized "${lib}") + endforeach() + foreach(lib ${TBB_DEBUG_LIBRARIES}) + list(APPEND TBB_LIBS debug "${lib}") + endforeach() +else() + set(TBB_LIBS ${TBB_LIBRARIES}) +endif() ###############################################################################