diff --git a/cmake/OpenCVFindIPP.cmake b/cmake/OpenCVFindIPP.cmake index db02e6acbf..a944b84979 100644 --- a/cmake/OpenCVFindIPP.cmake +++ b/cmake/OpenCVFindIPP.cmake @@ -85,8 +85,6 @@ function(get_ipp_version _ROOT_DIR) message(STATUS "found IPP: ${_MAJOR}.${_MINOR}.${_BUILD} [${_VERSION_STR}]") message(STATUS "at: ${_ROOT_DIR}") - return() - endfunction() @@ -129,8 +127,6 @@ function(set_ipp_old_libraries) ${IPP_LIB_PREFIX}${IPP_PREFIX}${IPPCORE}${IPP_ARCH}${IPP_SUFFIX}${IPP_LIB_SUFFIX} PARENT_SCOPE) - return() - endfunction() @@ -173,7 +169,6 @@ function(set_ipp_new_libraries _LATEST_VERSION) ${IPP_LIB_PREFIX}svml${CMAKE_SHARED_LIBRARY_SUFFIX}) endif() set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE) - return() endfunction() @@ -208,7 +203,7 @@ function(set_ipp_variables _LATEST_VERSION) set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE) message(STATUS "IPP libs: ${IPP_LIBRARIES}") - else() + elseif(${_LATEST_VERSION} VERSION_LESS "9.0") # message(STATUS "new") # set INCLUDE and LIB folders @@ -229,7 +224,10 @@ function(set_ipp_variables _LATEST_VERSION) endif() if (UNIX) - get_filename_component(INTEL_COMPILER_LIBRARY_DIR ${IPP_ROOT_DIR}/../lib REALPATH) + get_filename_component(INTEL_COMPILER_LIBRARY_DIR ${IPP_ROOT_DIR}/../compiler/lib REALPATH) + if(NOT EXISTS "${INTEL_COMPILER_LIBRARY_DIR}") + get_filename_component(INTEL_COMPILER_LIBRARY_DIR ${IPP_ROOT_DIR}/../lib REALPATH) + endif() if (IPP_X64) if(NOT EXISTS ${INTEL_COMPILER_LIBRARY_DIR}/intel64) message(SEND_ERROR "Intel compiler EM64T libraries not found") @@ -253,10 +251,11 @@ function(set_ipp_variables _LATEST_VERSION) set(IPP_LIBRARIES ${IPP_LIBRARIES} PARENT_SCOPE) message(STATUS "IPP libs: ${IPP_LIBRARIES}") + else() + message(STATUS "IPP: version ${_LATEST_VERSION} is not supported (${IPP_ROOT_DIR})") + set(IPP_FOUND 0 PARENT_SCOPE) endif() - return() - endfunction() diff --git a/modules/core/include/opencv2/core/internal.hpp b/modules/core/include/opencv2/core/internal.hpp index 4933654735..4ebc3a03ab 100644 --- a/modules/core/include/opencv2/core/internal.hpp +++ b/modules/core/include/opencv2/core/internal.hpp @@ -104,6 +104,10 @@ CV_INLINE IppiSize ippiSize(const cv::Size & _size) return size; } +#if IPP_VERSION_MAJOR >= 9 // IPP 9+ is not supported +#undef HAVE_IPP +#undef IPP_VERSION_MAJOR +#endif #endif #ifndef IPPI_CALL