diff --git a/cmake/features.cmake b/cmake/features.cmake index b785cddabe1..bfa3a05481d 100644 --- a/cmake/features.cmake +++ b/cmake/features.cmake @@ -162,7 +162,15 @@ else() set(ENABLE_SYSTEM_FLATBUFFERS_DEFAULT ON) endif() -ov_dependent_option (ENABLE_SYSTEM_TBB "Enables use of system TBB" OFF "THREADING MATCHES TBB" OFF) +# use system TBB only for Debian / RPM packages +if(CPACK_GENERATOR MATCHES "^(DEB|RPM|CONDA-FORGE|BREW|CONAN|VCPKG)$") + set(ENABLE_SYSTEM_TBB_DEFAULT ${ENABLE_SYSTEM_LIBS_DEFAULT}) +else() + set(ENABLE_SYSTEM_TBB_DEFAULT OFF) +endif() + +ov_dependent_option (ENABLE_SYSTEM_TBB "Enables use of system TBB" ${ENABLE_SYSTEM_TBB_DEFAULT} + "THREADING MATCHES TBB" OFF) ov_option (ENABLE_SYSTEM_PUGIXML "Enables use of system PugiXML" OFF) # the option is on by default, because we use only flatc compiler and don't use any libraries ov_dependent_option(ENABLE_SYSTEM_FLATBUFFERS "Enables use of system flatbuffers" ${ENABLE_SYSTEM_FLATBUFFERS_DEFAULT}