opencv-4.10.0-tbb-detection.patch 1.1 KB

1234567891011121314151617181920212223242526272829
  1. From 460bf0927fcc09e8c7a21d5bb48044fc923a8ee7 Mon Sep 17 00:00:00 2001
  2. From: Paul Zander <negril.nx+gentoo@gmail.com>
  3. Date: Tue, 8 Oct 2024 00:31:52 +0200
  4. Subject: [PATCH] Fix tbb detection
  5. Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
  6. diff --git a/cmake/OpenCVDetectTBB.cmake b/cmake/OpenCVDetectTBB.cmake
  7. index c9ecc02..3db3ae0 100644
  8. --- a/cmake/OpenCVDetectTBB.cmake
  9. +++ b/cmake/OpenCVDetectTBB.cmake
  10. @@ -25,7 +25,12 @@ function(ocv_tbb_cmake_guess _found)
  11. message(WARNING "No TBB::tbb target found!")
  12. return()
  13. endif()
  14. - get_target_property(_lib TBB::tbb IMPORTED_LOCATION_RELEASE)
  15. +
  16. + # Get installed configuration of tbb
  17. + get_target_property (TARGET_TBB_IMPORT_CONFS TBB::tbb IMPORTED_CONFIGURATIONS)
  18. + list (GET TARGET_TBB_IMPORT_CONFS 0 CHOSEN_IMPORT_CONF)
  19. +
  20. + get_target_property(_lib TBB::tbb IMPORTED_LOCATION_${CHOSEN_IMPORT_CONF})
  21. message(STATUS "Found TBB (cmake): ${_lib}")
  22. get_target_property(_inc TBB::tbb INTERFACE_INCLUDE_DIRECTORIES)
  23. add_library(tbb INTERFACE IMPORTED)
  24. --
  25. 2.46.2