mirror of
https://github.com/zebrajr/opencv.git
synced 2025-12-06 12:19:50 +01:00
cmake: workaround oneTBB build issues with MSVC
This commit is contained in:
parent
6be9496d73
commit
eced4dd023
|
|
@ -82,6 +82,11 @@ function(ocv_tbb_env_guess _found)
|
||||||
set_target_properties(tbb PROPERTIES INTERFACE_LINK_LIBRARIES "-L${_dir}")
|
set_target_properties(tbb PROPERTIES INTERFACE_LINK_LIBRARIES "-L${_dir}")
|
||||||
endif()
|
endif()
|
||||||
ocv_tbb_read_version("${TBB_ENV_INCLUDE}" tbb)
|
ocv_tbb_read_version("${TBB_ENV_INCLUDE}" tbb)
|
||||||
|
if(NOT (TBB_INTERFACE_VERSION LESS 12000)) # >= 12000, oneTBB 2021+
|
||||||
|
# avoid "defaultlib" requirement of tbb12.lib (we are using absolute path to 'tbb.lib' only)
|
||||||
|
# https://github.com/oneapi-src/oneTBB/blame/2dba2072869a189b9fdab3ffa431d3ea49059a19/include/oneapi/tbb/detail/_config.h#L334
|
||||||
|
target_compile_definitions(tbb INTERFACE "__TBB_NO_IMPLICIT_LINKAGE=1")
|
||||||
|
endif()
|
||||||
message(STATUS "Found TBB (env): ${TBB_ENV_LIB}")
|
message(STATUS "Found TBB (env): ${TBB_ENV_LIB}")
|
||||||
set(${_found} TRUE PARENT_SCOPE)
|
set(${_found} TRUE PARENT_SCOPE)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user