From: Alexander Alekhin Date: Fri, 13 Oct 2017 12:40:37 +0000 (+0300) Subject: cmake: fix LAPACK/MKL detection X-Git-Tag: accepted/tizen/6.0/unified/20201030.111113~503^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=23f26fb4a8b89c1280522a548f0e0658e0903f45;p=platform%2Fupstream%2Fopencv.git cmake: fix LAPACK/MKL detection --- diff --git a/cmake/OpenCVFindLAPACK.cmake b/cmake/OpenCVFindLAPACK.cmake index e281b4b..6a686c6 100644 --- a/cmake/OpenCVFindLAPACK.cmake +++ b/cmake/OpenCVFindLAPACK.cmake @@ -121,23 +121,22 @@ if(WITH_LAPACK) set(LAPACK_IMPL "LAPACK/MKL") ocv_lapack_check() endif() - if(LAPACKE_INCLUDE_DIR AND NOT HAVE_LAPACK) - set(LAPACK_INCLUDE_DIR ${LAPACKE_INCLUDE_DIR}) - set(LAPACK_CBLAS_H "cblas.h") - set(LAPACK_LAPACKE_H "lapacke.h") - set(LAPACK_IMPL "LAPACK/Generic") - ocv_lapack_check() - elseif(APPLE) - set(LAPACK_CBLAS_H "Accelerate/Accelerate.h") - set(LAPACK_LAPACKE_H "Accelerate/Accelerate.h") - set(LAPACK_IMPL "LAPACK/Apple") - ocv_lapack_check() - else() - unset(LAPACK_LIBRARIES) - unset(LAPACK_LIBRARIES CACHE) + if(NOT HAVE_LAPACK) + if(LAPACKE_INCLUDE_DIR) + set(LAPACK_INCLUDE_DIR ${LAPACKE_INCLUDE_DIR}) + set(LAPACK_CBLAS_H "cblas.h") + set(LAPACK_LAPACKE_H "lapacke.h") + set(LAPACK_IMPL "LAPACK/Generic") + ocv_lapack_check() + elseif(APPLE) + set(LAPACK_CBLAS_H "Accelerate/Accelerate.h") + set(LAPACK_LAPACKE_H "Accelerate/Accelerate.h") + set(LAPACK_IMPL "LAPACK/Apple") + ocv_lapack_check() + endif() endif() - else() - # LAPACK not found + endif() + if(NOT HAVE_LAPACK) unset(LAPACK_LIBRARIES) unset(LAPACK_LIBRARIES CACHE) endif()