mirror of
https://github.com/opencv/opencv.git
synced 2025-06-07 17:44:04 +08:00
Enable build with both old and new layouts of IPP
This commit is contained in:
parent
24907f35a3
commit
860b688cdd
2
3rdparty/ippicv/CMakeLists.txt
vendored
2
3rdparty/ippicv/CMakeLists.txt
vendored
@ -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,11 +122,19 @@ macro(ipp_detect_version)
|
||||
|
||||
if(APPLE AND NOT HAVE_IPP_ICV)
|
||||
_ipp_set_library_dir(${IPP_ROOT_DIR}/lib)
|
||||
elseif(IPP_X64)
|
||||
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()
|
||||
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)
|
||||
# dynamic linking is only supported for standalone version of Intel IPP
|
||||
|
Loading…
Reference in New Issue
Block a user