From: Victor Westerhuis Date: Fri, 9 Sep 2022 12:01:42 +0000 (+0200) Subject: Fix LAPACK finding CMake code X-Git-Tag: archive/raspbian/4.10.0+dfsg-5+rpi1^2^2~4 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=37b3cacf2def92fcfd4c95c99f9d04b793e48923;p=opencv.git Fix LAPACK finding CMake code On Debian cblas.h and lapacke.h are not installed in the same include directory. This does not matter when compiling, but the custom header check in OpenCV fails on it. Force OpenCV to use the standard CMake check_include_file function to do the check so it succeeds. Gbp-Pq: Name 0006-Fix-LAPACK-finding-CMake-code.patch --- diff --git a/cmake/OpenCVFindLAPACK.cmake b/cmake/OpenCVFindLAPACK.cmake index ba682c1..db15a8f 100644 --- a/cmake/OpenCVFindLAPACK.cmake +++ b/cmake/OpenCVFindLAPACK.cmake @@ -24,22 +24,11 @@ OCV_OPTION(OPENCV_OSX_USE_ACCELERATE_NEW_LAPACK "Use new BLAS/LAPACK interfaces macro(_find_header_file_in_dirs VAR NAME) unset(${VAR}) unset(${VAR} CACHE) - if(" ${ARGN}" STREQUAL " ") - check_include_file("${NAME}" HAVE_${VAR}) - if(HAVE_${VAR}) - set(${VAR} "${NAME}") # fallback - else() - set(${VAR} "") - endif() + check_include_file("${NAME}" HAVE_${VAR}) + if(HAVE_${VAR}) + set(${VAR} "${NAME}") # fallback else() - find_path(${VAR} "${NAME}" ${ARGN} NO_DEFAULT_PATH) - if(${VAR}) - set(${VAR} "${${VAR}}/${NAME}") - unset(${VAR} CACHE) - else() - unset(${VAR} CACHE) - set(${VAR} "") - endif() + set(${VAR} "") endif() endmacro()