TBB: added workaround for linking issue with conflicting system and custom libraries

pull/10769/head
Maksim Shabunin 7 years ago
parent 34a9ce6eb3
commit 108d07c655
  1. 5
      cmake/OpenCVDetectTBB.cmake

@ -71,6 +71,11 @@ function(ocv_tbb_env_guess _found)
IMPORTED_LOCATION_DEBUG "${TBB_ENV_LIB_DEBUG}"
INTERFACE_INCLUDE_DIRECTORIES "${TBB_ENV_INCLUDE}"
)
# workaround: system TBB library is used for linking instead of provided
if(CMAKE_COMPILER_IS_GNUCXX)
get_filename_component(_dir "${TBB_ENV_LIB}" DIRECTORY)
set_target_properties(tbb PROPERTIES INTERFACE_LINK_LIBRARIES "-L${_dir}")
endif()
message(STATUS "Found TBB (env): ${TBB_ENV_LIB}")
set(${_found} TRUE PARENT_SCOPE)
endif()

Loading…
Cancel
Save