mirror of
https://github.com/opencv/opencv.git
synced 2024-11-24 03:00:14 +08:00
TBB: added workaround for linking issue with conflicting system and custom libraries
This commit is contained in:
parent
34a9ce6eb3
commit
108d07c655
@ -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…
Reference in New Issue
Block a user