mirror of
https://github.com/opencv/opencv.git
synced 2026-07-21 19:33:03 +04:00
Add MKL support
This commit is contained in:
@@ -7,11 +7,21 @@ if(WITH_LAPACK)
|
||||
find_package(LAPACK)
|
||||
if(LAPACK_FOUND)
|
||||
find_path(LAPACKE_INCLUDE_DIR "lapacke.h")
|
||||
if(LAPACKE_INCLUDE_DIR)
|
||||
find_path(MKL_LAPACKE_INCLUDE_DIR "mkl_lapack.h")
|
||||
if(LAPACKE_INCLUDE_DIR OR MKL_LAPACKE_INCLUDE_DIR)
|
||||
find_path(CBLAS_INCLUDE_DIR "cblas.h")
|
||||
if(CBLAS_INCLUDE_DIR)
|
||||
find_path(MKL_CBLAS_INCLUDE_DIR "mkl_cblas.h")
|
||||
|
||||
if(CBLAS_INCLUDE_DIR OR MKL_CBLAS_INCLUDE_DIR)
|
||||
set(HAVE_LAPACK 1)
|
||||
|
||||
if(CBLAS_INCLUDE_DIR)
|
||||
ocv_include_directories(${LAPACKE_INCLUDE_DIR} ${CBLAS_INCLUDE_DIR})
|
||||
set(HAVE_LAPACK_GENERIC 1)
|
||||
elseif(MKL_CBLAS_INCLUDE_DIR)
|
||||
ocv_include_directories(${MKL_LAPACKE_INCLUDE_DIR} ${MKL_CBLAS_INCLUDE_DIR})
|
||||
set(HAVE_LAPACK_MKL 1)
|
||||
endif()
|
||||
list(APPEND OPENCV_LINKER_LIBS ${LAPACK_LIBRARIES})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user