diff --git a/cmake/OpenCVFindLAPACK.cmake b/cmake/OpenCVFindLAPACK.cmake index 09cd66cdae..e281b4b78c 100644 --- a/cmake/OpenCVFindLAPACK.cmake +++ b/cmake/OpenCVFindLAPACK.cmake @@ -136,6 +136,10 @@ if(WITH_LAPACK) unset(LAPACK_LIBRARIES) unset(LAPACK_LIBRARIES CACHE) endif() + else() + # LAPACK not found + unset(LAPACK_LIBRARIES) + unset(LAPACK_LIBRARIES CACHE) endif() endif()