diff --git a/cmake/FindTBB.cmake b/cmake/FindTBB.cmake index 201dc94..a13c8bb 100644 --- a/cmake/FindTBB.cmake +++ b/cmake/FindTBB.cmake @@ -8,6 +8,13 @@ ## target TBB can be found where the component targets TBB:comp are out of scope, causing an ## error at line 222 +#=============================================================================== +# Try to find modern system-provided TBB first +find_package(TBB CONFIG QUIET) +if(TBB_FOUND) + # System TBB found, use it and skip the rest of this legacy script + return() +endif() #=============================================================================== # This script will attempt to find TBB and set up a TBB target. #