File occt-use-system-tbb.patch of Package occt

Index: OCCT-7_9_1/CMakeLists.txt
===================================================================
--- OCCT-7_9_1.orig/CMakeLists.txt	2025-05-20 13:17:10.000000000 +0200
+++ OCCT-7_9_1/CMakeLists.txt	2025-07-15 17:39:10.823773749 +0200
@@ -648,7 +648,7 @@ endif()
 if (CAN_USE_TBB AND USE_TBB)
   add_definitions (-DHAVE_TBB)
   OCCT_ADD_VCPKG_FEATURE ("tbb")
-  list (APPEND OCCT_3RDPARTY_CMAKE_LIST "adm/cmake/tbb")
+  find_package(TBB CONFIG REQUIRED)
 elseif (NOT CAN_USE_TBB)
   OCCT_CHECK_AND_UNSET ("USE_TBB")
   OCCT_UNSET_VCPKG_FEATURE ("tbb")
Index: OCCT-7_9_1/adm/cmake/tbb.cmake
===================================================================
--- OCCT-7_9_1.orig/adm/cmake/tbb.cmake	2025-07-15 17:40:48.874435495 +0200
+++ OCCT-7_9_1/adm/cmake/tbb.cmake	2025-07-15 17:41:19.293768202 +0200
@@ -52,7 +52,7 @@ if (WIN32)
   # Employ it.
   if (EXISTS "${3RDPARTY_TBB_DIR}")
     find_package (
-      TBB 2021.5
+      TBB
       PATHS "${3RDPARTY_TBB_DIR}" NO_DEFAULT_PATH
       REQUIRED
       CONFIG)
@@ -173,23 +173,23 @@ else ()
       endif()
     endif()
     if ((NOT "${3RDPARTY_TBB_DIR}" STREQUAL "") AND (EXISTS "${3RDPARTY_TBB_DIR}"))
-      # Find TBB 2021.5 in existing directory.
+      # Find TBB in existing directory.
       find_package (
-      TBB 2021.5
+      TBB
       PATHS "${3RDPARTY_TBB_DIR}" NO_DEFAULT_PATH
       REQUIRED
       CONFIG)
     else()
-      # Find TBB 2021.5 in system directory.
+      # Find TBB in system directory.
       find_package (
-      TBB 2021.5
+      TBB
       REQUIRED
       CONFIG)
     endif()
   else()
-    # Find TBB 2021.5 in system directory.
+    # Find TBB in system directory.
     find_package (
-    TBB 2021.5
+    TBB
     REQUIRED
     CONFIG)
   endif()
openSUSE Build Service is sponsored by