diff --git a/3rdparty/ippicv/CMakeLists.txt b/3rdparty/ippicv/CMakeLists.txt index 4ef248f3c0..05cab2486f 100644 --- a/3rdparty/ippicv/CMakeLists.txt +++ b/3rdparty/ippicv/CMakeLists.txt @@ -10,7 +10,7 @@ if(HAVE_IPP_ICV) add_definitions(-DICV_BASE) endif() -file(GLOB lib_srcs ${IPP_IW_PATH}/src/*.c) +file(GLOB lib_srcs ${IPP_IW_PATH}/src/*.c ${IPP_IW_PATH}/src/*.cpp) file(GLOB lib_hdrs ${IPP_IW_PATH}/include/*.h ${IPP_IW_PATH}/include/iw/*.h ${IPP_IW_PATH}/include/iw++/*.hpp) # ---------------------------------------------------------------------------------- diff --git a/cmake/OpenCVFindIPP.cmake b/cmake/OpenCVFindIPP.cmake index 2328ef8b43..eb26bea5a1 100644 --- a/cmake/OpenCVFindIPP.cmake +++ b/cmake/OpenCVFindIPP.cmake @@ -87,9 +87,14 @@ macro(ipp_detect_version) get_filename_component(IPP_INCLUDE_DIRS ${IPP_VERSION_FILE} PATH) set(__msg) + set(IPP_NEW_LAYOUT 0) if(EXISTS ${IPP_ROOT_DIR}/include/ippicv_redefs.h) set(__msg " (ICV version)") set(HAVE_IPP_ICV 1) + elseif(EXISTS ${IPP_ROOT_DIR}/include/ipp/ipp.h) + set(IPP_NEW_LAYOUT 1) + # workaround to enable both layouts + add_definitions(-DIPP_PRESERVE_OLD_LAYOUT) elseif(EXISTS ${IPP_ROOT_DIR}/include/ipp.h) # nothing else() @@ -117,10 +122,18 @@ macro(ipp_detect_version) if(APPLE AND NOT HAVE_IPP_ICV) _ipp_set_library_dir(${IPP_ROOT_DIR}/lib) - elseif(IPP_X64) - _ipp_set_library_dir(${IPP_ROOT_DIR}/lib/intel64) + elseif (IPP_NEW_LAYOUT) + if(IPP_X64) + _ipp_set_library_dir(${IPP_ROOT_DIR}/lib) + else() + _ipp_set_library_dir(${IPP_ROOT_DIR}/lib32) + endif() else() - _ipp_set_library_dir(${IPP_ROOT_DIR}/lib/ia32) + if(IPP_X64) + _ipp_set_library_dir(${IPP_ROOT_DIR}/lib/intel64) + else() + _ipp_set_library_dir(${IPP_ROOT_DIR}/lib/ia32) + endif() endif() macro(_ipp_add_library name)