From 37faf3320a59a881a0fe5efdc7c8e0d387dfd07c Mon Sep 17 00:00:00 2001 From: Andreas Wendleder Date: Sat, 25 Apr 2026 11:13:07 +0200 Subject: [PATCH] Support modern system TBB via CONFIG mode --- cmake/FindTBB.cmake | 7 +++++++ 1 file changed, 7 insertions(+) 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. #