Skip to content

Commit 9c3eeff

Browse files
Bugfix TBB linking #5782
The query if(WIN32 AND CMAKE_BUILD_TYPE MATCHES Debug) only works if you call CMake explicitly with the build configuration Debug. But if you generate Debug and Release all libraries are linked to the release version.
1 parent 365121d commit 9c3eeff

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -530,8 +530,8 @@ else()
530530

531531
find_package(TBB REQUIRED)
532532
add_dependency_includes(${TBB_INCLUDE_DIR})
533-
if(WIN32 AND CMAKE_BUILD_TYPE MATCHES Debug)
534-
set(TBB_LIBRARIES ${TBB_DEBUG_LIBRARIES})
533+
if(WIN32)
534+
set(TBB_LIBRARIES optimized ${TBB_LIBRARY} optimized ${TBB_MALLOC_LIBRARY} debug ${TBB_LIBRARY_DEBUG} debug ${TBB_MALLOC_LIBRARY_DEBUG})
535535
endif()
536536

537537
find_package(EXPAT REQUIRED)

0 commit comments

Comments
 (0)