Enable build with both old and new layouts of IPP

pull/25773/head
eplankin 5 months ago
parent 24907f35a3
commit 860b688cdd
  1. 2
      3rdparty/ippicv/CMakeLists.txt
  2. 19
      cmake/OpenCVFindIPP.cmake

@ -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)
# ----------------------------------------------------------------------------------

@ -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)

Loading…
Cancel
Save