Commit 23f26fb4 authored by Alexander Alekhin's avatar Alexander Alekhin

cmake: fix LAPACK/MKL detection

parent 1ba29cc9
...@@ -121,23 +121,22 @@ if(WITH_LAPACK) ...@@ -121,23 +121,22 @@ if(WITH_LAPACK)
set(LAPACK_IMPL "LAPACK/MKL") set(LAPACK_IMPL "LAPACK/MKL")
ocv_lapack_check() ocv_lapack_check()
endif() endif()
if(LAPACKE_INCLUDE_DIR AND NOT HAVE_LAPACK) if(NOT HAVE_LAPACK)
set(LAPACK_INCLUDE_DIR ${LAPACKE_INCLUDE_DIR}) if(LAPACKE_INCLUDE_DIR)
set(LAPACK_CBLAS_H "cblas.h") set(LAPACK_INCLUDE_DIR ${LAPACKE_INCLUDE_DIR})
set(LAPACK_LAPACKE_H "lapacke.h") set(LAPACK_CBLAS_H "cblas.h")
set(LAPACK_IMPL "LAPACK/Generic") set(LAPACK_LAPACKE_H "lapacke.h")
ocv_lapack_check() set(LAPACK_IMPL "LAPACK/Generic")
elseif(APPLE) ocv_lapack_check()
set(LAPACK_CBLAS_H "Accelerate/Accelerate.h") elseif(APPLE)
set(LAPACK_LAPACKE_H "Accelerate/Accelerate.h") set(LAPACK_CBLAS_H "Accelerate/Accelerate.h")
set(LAPACK_IMPL "LAPACK/Apple") set(LAPACK_LAPACKE_H "Accelerate/Accelerate.h")
ocv_lapack_check() set(LAPACK_IMPL "LAPACK/Apple")
else() ocv_lapack_check()
unset(LAPACK_LIBRARIES) endif()
unset(LAPACK_LIBRARIES CACHE)
endif() endif()
else() endif()
# LAPACK not found if(NOT HAVE_LAPACK)
unset(LAPACK_LIBRARIES) unset(LAPACK_LIBRARIES)
unset(LAPACK_LIBRARIES CACHE) unset(LAPACK_LIBRARIES CACHE)
endif() endif()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment