summaryrefslogtreecommitdiff
path: root/sci-libs/opencascade/files/opencascade-7.7.0-tbb-detection.patch
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/opencascade/files/opencascade-7.7.0-tbb-detection.patch')
-rw-r--r--sci-libs/opencascade/files/opencascade-7.7.0-tbb-detection.patch53
1 files changed, 53 insertions, 0 deletions
diff --git a/sci-libs/opencascade/files/opencascade-7.7.0-tbb-detection.patch b/sci-libs/opencascade/files/opencascade-7.7.0-tbb-detection.patch
new file mode 100644
index 000000000000..c93b009a9da6
--- /dev/null
+++ b/sci-libs/opencascade/files/opencascade-7.7.0-tbb-detection.patch
@@ -0,0 +1,53 @@
+From: Fabio Rossi <rossi.f@inwind.it>
+See-Also: https://tracker.dev.opencascade.org/view.php?id=33612
+Fix tbb detection
+
+--- ./adm/cmake/tbb.cmake 2022-11-11 23:19:44.000000000 +0100
++++ ./adm/cmake/tbb.cmake.new 2024-02-24 18:59:32.267165878 +0100
+@@ -56,13 +56,17 @@
+ list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
+ endif()
+
++ # Get installed configuration of tbb
++ get_target_property (TARGET_TBB_IMPORT_CONFS TBB::tbb IMPORTED_CONFIGURATIONS)
++ list (GET TARGET_TBB_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
++
+ separate_arguments (CSF_TBB)
+ foreach (LIB IN LISTS CSF_TBB)
+ string(TOLOWER "${LIB}" LIB_LOWER)
+ string(TOUPPER "${LIB}" LIB_UPPER)
+
+ # Achive *.lib files and directory containing it.
+- get_target_property (TBB_LIB_FILE "TBB::${LIB_LOWER}" IMPORTED_IMPLIB_RELEASE)
++ get_target_property (TBB_LIB_FILE "TBB::${LIB_LOWER}" IMPORTED_IMPLIB_${CHOSEN_IMPORT_CONF})
+ # Reserve cache variable for *.lib.
+ if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY)
+ set (3RDPARTY_${LIB_UPPER}_LIBRARY "" CACHE FILEPATH "${LIB_UPPER} library (*.lib)")
+@@ -89,7 +93,7 @@
+ endif()
+
+ # Achive *.dll files and directory containing it.
+- get_target_property (TBB_DLL_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_RELEASE)
++ get_target_property (TBB_DLL_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF})
+ # Reserve cache variable for *.dll.
+ if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_DLL)
+ set (3RDPARTY_${LIB_UPPER}_DLL "" CACHE FILEPATH "${LIB_UPPER} library (*.dll)")
+@@ -185,13 +189,17 @@
+ list (APPEND 3RDPARTY_NOT_INCLUDED 3RDPARTY_TBB_INCLUDE_DIR)
+ endif()
+
++ # Get installed configuration of tbb
++ get_target_property (TARGET_TBB_IMPORT_CONFS TBB::tbb IMPORTED_CONFIGURATIONS)
++ list (GET TARGET_TBB_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
++
+ separate_arguments (CSF_TBB)
+ foreach (LIB IN LISTS CSF_TBB)
+ string(TOLOWER "${LIB}" LIB_LOWER)
+ string(TOUPPER "${LIB}" LIB_UPPER)
+
+ # Achive *.so files and directory containing it.
+- get_target_property (TBB_SO_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_RELEASE)
++ get_target_property (TBB_SO_FILE "TBB::${LIB_LOWER}" IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF})
+ # Reserve cache variable for *.so.
+ if (NOT DEFINED 3RDPARTY_${LIB_UPPER}_LIBRARY)
+ set (3RDPARTY_${LIB_UPPER}_LIBRARY "" CACHE FILEPATH "${LIB_UPPER} library (*.so)")