opencv-4.5.0-link-with-cblas-for-lapack.patch 726 B

12345678910111213141516171819
  1. diff --git a/cmake/OpenCVFindLAPACK.cmake b/cmake/OpenCVFindLAPACK.cmake
  2. index 342bebc..9ebd206 100644
  3. --- a/cmake/OpenCVFindLAPACK.cmake
  4. +++ b/cmake/OpenCVFindLAPACK.cmake
  5. @@ -136,10 +136,12 @@ if(WITH_LAPACK)
  6. ocv_lapack_check()
  7. endif()
  8. if(NOT HAVE_LAPACK)
  9. - if(LAPACKE_INCLUDE_DIR)
  10. + find_package(CBLAS)
  11. + if(LAPACKE_INCLUDE_DIR AND CBLAS_FOUND)
  12. set(LAPACK_INCLUDE_DIR ${LAPACKE_INCLUDE_DIR})
  13. set(LAPACK_CBLAS_H "cblas.h")
  14. set(LAPACK_LAPACKE_H "lapacke.h")
  15. + set(LAPACK_LIBRARIES ${LAPACK_LIBRARIES} ${CBLAS_LIBRARIES})
  16. set(LAPACK_IMPL "LAPACK/Generic")
  17. ocv_lapack_check()
  18. elseif(APPLE)