From a7c843d2132c39fe699423af1a4fe44a86e4ff8d Mon Sep 17 00:00:00 2001 From: tamasmeszaros Date: Mon, 14 Oct 2019 15:48:29 +0200 Subject: [PATCH] Fix the missing link dependencies for tbb on Linux --- cmake/modules/FindTBB.cmake | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/cmake/modules/FindTBB.cmake b/cmake/modules/FindTBB.cmake index 153e615eb..b09bafda3 100644 --- a/cmake/modules/FindTBB.cmake +++ b/cmake/modules/FindTBB.cmake @@ -290,6 +290,11 @@ if(NOT TBB_FOUND) IMPORTED_LOCATION_MINSIZEREL ${TBB_LIBRARIES_RELEASE} ) endif() + + if(CMAKE_SYSTEM_NAME STREQUAL "Linux") + find_package(Threads QUIET REQUIRED) + set_target_properties(TBB::tbb PROPERTIES INTERFACE_LINK_LIBRARIES "${CMAKE_DL_LIBS};Threads::Threads") + endif() endif() mark_as_advanced(TBB_INCLUDE_DIRS TBB_LIBRARIES)