2012-01-03 21:48:12 +08:00
|
|
|
#
|
|
|
|
# The script to detect Intel(R) Integrated Performance Primitives (IPP)
|
|
|
|
# installation/package
|
|
|
|
#
|
2014-04-08 18:01:44 +08:00
|
|
|
# By default, ICV version will be used.
|
|
|
|
# To use standalone IPP update cmake command line:
|
|
|
|
# cmake ... -DIPPROOT=<path> ...
|
|
|
|
#
|
|
|
|
# Note: Backward compatibility is broken, IPPROOT environment path is ignored
|
2014-04-02 22:32:19 +08:00
|
|
|
#
|
2012-01-03 21:48:12 +08:00
|
|
|
#
|
|
|
|
# On return this will define:
|
|
|
|
#
|
2017-08-17 19:57:58 +08:00
|
|
|
# HAVE_IPP - True if Intel IPP found
|
|
|
|
# HAVE_IPP_ICV - True if Intel IPP ICV version is available
|
|
|
|
# IPP_ROOT_DIR - root of IPP installation
|
|
|
|
# IPP_INCLUDE_DIRS - IPP include folder
|
|
|
|
# IPP_LIBRARIES - IPP libraries that are used by OpenCV
|
|
|
|
# IPP_VERSION_STR - string with the newest detected IPP version
|
|
|
|
# IPP_VERSION_MAJOR - numbers of IPP version (MAJOR.MINOR.BUILD)
|
2014-04-02 22:32:19 +08:00
|
|
|
# IPP_VERSION_MINOR
|
|
|
|
# IPP_VERSION_BUILD
|
2012-01-03 21:48:12 +08:00
|
|
|
#
|
|
|
|
# Created: 30 Dec 2010 by Vladimir Dudnik (vladimir.dudnik@intel.com)
|
|
|
|
#
|
|
|
|
|
2014-04-02 22:32:19 +08:00
|
|
|
unset(HAVE_IPP CACHE)
|
2017-08-17 19:57:58 +08:00
|
|
|
unset(HAVE_IPP_ICV)
|
2014-04-02 22:32:19 +08:00
|
|
|
unset(IPP_ROOT_DIR)
|
|
|
|
unset(IPP_INCLUDE_DIRS)
|
|
|
|
unset(IPP_LIBRARIES)
|
|
|
|
unset(IPP_VERSION_STR)
|
|
|
|
unset(IPP_VERSION_MAJOR)
|
|
|
|
unset(IPP_VERSION_MINOR)
|
|
|
|
unset(IPP_VERSION_BUILD)
|
|
|
|
|
2015-03-05 23:58:54 +08:00
|
|
|
if (X86 AND UNIX AND NOT APPLE AND NOT ANDROID AND BUILD_SHARED_LIBS)
|
2017-04-13 20:50:23 +08:00
|
|
|
message(STATUS "On 32-bit Linux Intel IPP can not currently be used with dynamic libs because of linker errors. Set BUILD_SHARED_LIBS=OFF")
|
2015-03-05 23:58:54 +08:00
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
2012-01-03 21:48:12 +08:00
|
|
|
set(IPP_X64 0)
|
2019-12-11 06:35:36 +08:00
|
|
|
if(X86_64)
|
|
|
|
set(IPP_X64 1)
|
2012-01-03 21:48:12 +08:00
|
|
|
endif()
|
|
|
|
|
2017-04-13 20:50:23 +08:00
|
|
|
# This function detects Intel IPP version by analyzing .h file
|
2014-04-08 18:01:44 +08:00
|
|
|
macro(ipp_get_version VERSION_FILE)
|
2014-04-02 22:32:19 +08:00
|
|
|
unset(_VERSION_STR)
|
|
|
|
unset(_MAJOR)
|
|
|
|
unset(_MINOR)
|
|
|
|
unset(_BUILD)
|
|
|
|
|
2017-04-13 20:50:23 +08:00
|
|
|
# read Intel IPP version info from file
|
2014-04-08 18:01:44 +08:00
|
|
|
file(STRINGS ${VERSION_FILE} STR1 REGEX "IPP_VERSION_MAJOR")
|
|
|
|
file(STRINGS ${VERSION_FILE} STR2 REGEX "IPP_VERSION_MINOR")
|
|
|
|
file(STRINGS ${VERSION_FILE} STR3 REGEX "IPP_VERSION_BUILD")
|
2014-04-02 22:32:19 +08:00
|
|
|
if("${STR3}" STREQUAL "")
|
2014-04-08 18:01:44 +08:00
|
|
|
file(STRINGS ${VERSION_FILE} STR3 REGEX "IPP_VERSION_UPDATE")
|
2014-04-02 22:32:19 +08:00
|
|
|
endif()
|
2014-04-08 18:01:44 +08:00
|
|
|
file(STRINGS ${VERSION_FILE} STR4 REGEX "IPP_VERSION_STR")
|
2014-04-02 22:32:19 +08:00
|
|
|
|
|
|
|
# extract info and assign to variables
|
|
|
|
string(REGEX MATCHALL "[0-9]+" _MAJOR ${STR1})
|
|
|
|
string(REGEX MATCHALL "[0-9]+" _MINOR ${STR2})
|
|
|
|
string(REGEX MATCHALL "[0-9]+" _BUILD ${STR3})
|
|
|
|
string(REGEX MATCHALL "[0-9]+[.]+[0-9]+[^\"]+|[0-9]+[.]+[0-9]+" _VERSION_STR ${STR4})
|
|
|
|
|
|
|
|
# export info to parent scope
|
|
|
|
set(IPP_VERSION_STR ${_VERSION_STR})
|
|
|
|
set(IPP_VERSION_MAJOR ${_MAJOR})
|
|
|
|
set(IPP_VERSION_MINOR ${_MINOR})
|
|
|
|
set(IPP_VERSION_BUILD ${_BUILD})
|
2014-04-08 18:01:44 +08:00
|
|
|
endmacro()
|
|
|
|
|
|
|
|
macro(_ipp_not_supported)
|
|
|
|
message(STATUS ${ARGN})
|
|
|
|
unset(HAVE_IPP)
|
2017-08-17 19:57:58 +08:00
|
|
|
unset(HAVE_IPP_ICV)
|
2014-04-08 18:01:44 +08:00
|
|
|
unset(IPP_VERSION_STR)
|
|
|
|
return()
|
|
|
|
endmacro()
|
|
|
|
|
|
|
|
# This macro uses IPP_ROOT_DIR variable
|
|
|
|
# TODO Cleanup code after ICV package stabilization
|
|
|
|
macro(ipp_detect_version)
|
|
|
|
set(IPP_INCLUDE_DIRS ${IPP_ROOT_DIR}/include)
|
2014-04-02 22:32:19 +08:00
|
|
|
|
|
|
|
set(__msg)
|
2014-04-28 22:36:58 +08:00
|
|
|
if(EXISTS ${IPP_ROOT_DIR}/include/ippicv_redefs.h)
|
2014-04-08 18:01:44 +08:00
|
|
|
set(__msg " (ICV version)")
|
2017-08-17 19:57:58 +08:00
|
|
|
set(HAVE_IPP_ICV 1)
|
2014-04-08 18:01:44 +08:00
|
|
|
elseif(EXISTS ${IPP_ROOT_DIR}/include/ipp.h)
|
2014-04-28 22:36:58 +08:00
|
|
|
# nothing
|
2014-04-08 18:01:44 +08:00
|
|
|
else()
|
2017-04-13 20:50:23 +08:00
|
|
|
_ipp_not_supported("Can't resolve Intel IPP directory: ${IPP_ROOT_DIR}")
|
2014-04-02 22:32:19 +08:00
|
|
|
endif()
|
|
|
|
|
2014-04-28 22:36:58 +08:00
|
|
|
ipp_get_version(${IPP_INCLUDE_DIRS}/ippversion.h)
|
|
|
|
ocv_assert(IPP_VERSION_STR VERSION_GREATER "1.0")
|
|
|
|
|
2017-04-13 20:50:23 +08:00
|
|
|
message(STATUS "found Intel IPP${__msg}: ${_MAJOR}.${_MINOR}.${_BUILD} [${IPP_VERSION_STR}]")
|
2014-04-08 18:01:44 +08:00
|
|
|
message(STATUS "at: ${IPP_ROOT_DIR}")
|
2014-04-02 22:32:19 +08:00
|
|
|
|
2018-10-21 23:02:40 +08:00
|
|
|
if(IPP_VERSION_STR VERSION_LESS "7.0")
|
2017-04-13 20:50:23 +08:00
|
|
|
_ipp_not_supported("Intel IPP ${IPP_VERSION_STR} is not supported")
|
2014-04-08 18:01:44 +08:00
|
|
|
endif()
|
2014-04-02 22:32:19 +08:00
|
|
|
|
2014-04-08 18:01:44 +08:00
|
|
|
set(HAVE_IPP 1)
|
2014-04-02 22:32:19 +08:00
|
|
|
|
2014-04-08 18:01:44 +08:00
|
|
|
macro(_ipp_set_library_dir DIR)
|
|
|
|
if(NOT EXISTS ${DIR})
|
2017-04-13 20:50:23 +08:00
|
|
|
_ipp_not_supported("Intel IPP library directory not found")
|
2014-04-08 18:01:44 +08:00
|
|
|
endif()
|
|
|
|
set(IPP_LIBRARY_DIR ${DIR})
|
|
|
|
endmacro()
|
2014-04-02 22:32:19 +08:00
|
|
|
|
2017-08-17 19:57:58 +08:00
|
|
|
if(APPLE AND NOT HAVE_IPP_ICV)
|
2014-04-28 22:36:58 +08:00
|
|
|
_ipp_set_library_dir(${IPP_ROOT_DIR}/lib)
|
|
|
|
elseif(IPP_X64)
|
|
|
|
_ipp_set_library_dir(${IPP_ROOT_DIR}/lib/intel64)
|
2014-04-02 22:32:19 +08:00
|
|
|
else()
|
2014-04-28 22:36:58 +08:00
|
|
|
_ipp_set_library_dir(${IPP_ROOT_DIR}/lib/ia32)
|
2014-04-02 22:32:19 +08:00
|
|
|
endif()
|
2012-01-03 21:48:12 +08:00
|
|
|
|
2014-04-08 18:01:44 +08:00
|
|
|
macro(_ipp_add_library name)
|
2017-04-13 20:50:23 +08:00
|
|
|
# dynamic linking is only supported for standalone version of Intel IPP
|
2017-08-17 19:57:58 +08:00
|
|
|
if (BUILD_WITH_DYNAMIC_IPP AND NOT HAVE_IPP_ICV)
|
2017-03-31 21:44:38 +08:00
|
|
|
if (WIN32)
|
|
|
|
set(IPP_LIB_PREFIX ${CMAKE_IMPORT_LIBRARY_PREFIX})
|
|
|
|
set(IPP_LIB_SUFFIX ${CMAKE_IMPORT_LIBRARY_SUFFIX})
|
|
|
|
else (WIN32)
|
|
|
|
set(IPP_LIB_PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
|
|
|
|
set(IPP_LIB_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
|
|
|
|
endif (WIN32)
|
2014-12-12 21:21:47 +08:00
|
|
|
else ()
|
|
|
|
set(IPP_LIB_PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX})
|
|
|
|
set(IPP_LIB_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
|
|
|
|
endif ()
|
2014-04-08 18:01:44 +08:00
|
|
|
if (EXISTS ${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${name}${IPP_SUFFIX}${IPP_LIB_SUFFIX})
|
2017-08-17 19:57:58 +08:00
|
|
|
if (BUILD_WITH_DYNAMIC_IPP AND NOT HAVE_IPP_ICV)
|
2017-04-13 20:50:23 +08:00
|
|
|
# When using dynamic libraries from standalone Intel IPP it is your responsibility to install those on the target system
|
2014-12-23 21:10:47 +08:00
|
|
|
list(APPEND IPP_LIBRARIES ${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${name}${IPP_SUFFIX}${IPP_LIB_SUFFIX})
|
2014-12-12 21:21:47 +08:00
|
|
|
else ()
|
2014-12-23 21:10:47 +08:00
|
|
|
add_library(ipp${name} STATIC IMPORTED)
|
2021-03-31 17:24:37 +08:00
|
|
|
set(_filename "${IPP_LIB_PREFIX}${IPP_PREFIX}${name}${IPP_SUFFIX}${IPP_LIB_SUFFIX}")
|
2014-12-23 21:10:47 +08:00
|
|
|
set_target_properties(ipp${name} PROPERTIES
|
|
|
|
IMPORTED_LINK_INTERFACE_LIBRARIES ""
|
2021-03-31 17:24:37 +08:00
|
|
|
IMPORTED_LOCATION ${IPP_LIBRARY_DIR}/${_filename}
|
2014-12-23 21:10:47 +08:00
|
|
|
)
|
2021-03-31 17:24:37 +08:00
|
|
|
if("${name}" STREQUAL "core") # https://github.com/opencv/opencv/pull/19681
|
|
|
|
if(OPENCV_FORCE_IPP_EXCLUDE_LIBS OR OPENCV_FORCE_IPP_EXCLUDE_LIBS_CORE
|
|
|
|
OR (UNIX AND NOT ANDROID AND NOT APPLE
|
|
|
|
AND (CMAKE_CXX_COMPILER_ID MATCHES "GNU" OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
|
|
|
|
)
|
|
|
|
AND NOT OPENCV_SKIP_IPP_EXCLUDE_LIBS_CORE
|
|
|
|
)
|
|
|
|
if(CMAKE_VERSION VERSION_LESS "3.13.0")
|
|
|
|
set(CMAKE_SHARED_LINKER_FLAGS "-Wl,--exclude-libs,${_filename} ${CMAKE_SHARED_LINKER_FLAGS}")
|
|
|
|
else()
|
|
|
|
target_link_options(ipp${name} INTERFACE "LINKER:--exclude-libs,${_filename}")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
endif()
|
2014-12-23 21:10:47 +08:00
|
|
|
list(APPEND IPP_LIBRARIES ipp${name})
|
2020-04-17 22:28:42 +08:00
|
|
|
if (NOT BUILD_SHARED_LIBS AND (HAVE_IPP_ICV OR ";${OPENCV_INSTALL_EXTERNAL_DEPENDENCIES};" MATCHES ";ipp;"))
|
2015-12-11 01:17:17 +08:00
|
|
|
# CMake doesn't support "install(TARGETS ${IPP_PREFIX}${name} " command with imported targets
|
|
|
|
install(FILES ${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${name}${IPP_SUFFIX}${IPP_LIB_SUFFIX}
|
|
|
|
DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev)
|
|
|
|
string(TOUPPER ${name} uname)
|
|
|
|
set(IPP${uname}_INSTALL_PATH "${CMAKE_INSTALL_PREFIX}/${OPENCV_3P_LIB_INSTALL_PATH}/${IPP_LIB_PREFIX}${IPP_PREFIX}${name}${IPP_SUFFIX}${IPP_LIB_SUFFIX}" CACHE INTERNAL "" FORCE)
|
|
|
|
set(IPP${uname}_LOCATION_PATH "${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${name}${IPP_SUFFIX}${IPP_LIB_SUFFIX}" CACHE INTERNAL "" FORCE)
|
|
|
|
endif()
|
2014-12-23 21:10:47 +08:00
|
|
|
endif()
|
2014-04-08 18:01:44 +08:00
|
|
|
else()
|
2017-04-13 20:50:23 +08:00
|
|
|
message(STATUS "Can't find Intel IPP library: ${name} at ${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${name}${IPP_SUFFIX}${IPP_LIB_SUFFIX}")
|
2014-04-08 18:01:44 +08:00
|
|
|
endif()
|
|
|
|
endmacro()
|
|
|
|
|
2014-04-02 22:32:19 +08:00
|
|
|
set(IPP_PREFIX "ipp")
|
2018-10-21 23:02:40 +08:00
|
|
|
if(IPP_VERSION_STR VERSION_LESS "8.0")
|
2017-08-17 19:57:58 +08:00
|
|
|
if (BUILD_WITH_DYNAMIC_IPP AND NOT HAVE_IPP_ICV)
|
2017-04-13 20:50:23 +08:00
|
|
|
set(IPP_SUFFIX "") # dynamic not threaded libs suffix Intel IPP 7.x
|
2014-12-12 21:21:47 +08:00
|
|
|
else ()
|
2017-04-13 20:50:23 +08:00
|
|
|
set(IPP_SUFFIX "_l") # static not threaded libs suffix Intel IPP 7.x
|
2014-12-12 21:21:47 +08:00
|
|
|
endif ()
|
|
|
|
else ()
|
2014-04-02 22:32:19 +08:00
|
|
|
if(WIN32)
|
2017-08-17 19:57:58 +08:00
|
|
|
if (BUILD_WITH_DYNAMIC_IPP AND NOT HAVE_IPP_ICV)
|
2017-04-13 20:50:23 +08:00
|
|
|
set(IPP_SUFFIX "") # dynamic not threaded libs suffix Intel IPP 8.x for Windows
|
2014-12-12 21:21:47 +08:00
|
|
|
else ()
|
2017-04-13 20:50:23 +08:00
|
|
|
set(IPP_SUFFIX "mt") # static not threaded libs suffix Intel IPP 8.x for Windows
|
2014-12-12 21:21:47 +08:00
|
|
|
endif ()
|
2014-04-02 22:32:19 +08:00
|
|
|
else()
|
2017-04-13 20:50:23 +08:00
|
|
|
set(IPP_SUFFIX "") # static not threaded libs suffix Intel IPP 8.x for Linux/OS X
|
2014-02-17 19:28:21 +08:00
|
|
|
endif()
|
2014-04-02 22:32:19 +08:00
|
|
|
endif()
|
|
|
|
|
2017-08-17 19:57:58 +08:00
|
|
|
if(HAVE_IPP_ICV)
|
2014-04-08 18:01:44 +08:00
|
|
|
_ipp_add_library(icv)
|
|
|
|
else()
|
2017-01-31 21:39:09 +08:00
|
|
|
_ipp_add_library(cv)
|
2014-04-08 18:01:44 +08:00
|
|
|
_ipp_add_library(i)
|
|
|
|
_ipp_add_library(cc)
|
2017-01-31 21:39:09 +08:00
|
|
|
_ipp_add_library(s)
|
2014-04-08 18:01:44 +08:00
|
|
|
_ipp_add_library(vm)
|
2017-01-31 21:39:09 +08:00
|
|
|
_ipp_add_library(core)
|
2014-04-08 18:01:44 +08:00
|
|
|
|
2017-01-31 21:39:09 +08:00
|
|
|
if(UNIX AND IPP_VERSION_MAJOR LESS 2017)
|
2014-04-02 22:32:19 +08:00
|
|
|
get_filename_component(INTEL_COMPILER_LIBRARY_DIR ${IPP_ROOT_DIR}/../lib REALPATH)
|
2014-04-08 18:01:44 +08:00
|
|
|
if(NOT EXISTS ${INTEL_COMPILER_LIBRARY_DIR})
|
|
|
|
get_filename_component(INTEL_COMPILER_LIBRARY_DIR ${IPP_ROOT_DIR}/../compiler/lib REALPATH)
|
2014-04-02 22:32:19 +08:00
|
|
|
endif()
|
2014-04-08 18:01:44 +08:00
|
|
|
if(NOT EXISTS ${INTEL_COMPILER_LIBRARY_DIR})
|
2017-04-13 20:50:23 +08:00
|
|
|
_ipp_not_supported("Intel IPP configuration error: can't find Intel compiler library dir ${INTEL_COMPILER_LIBRARY_DIR}")
|
2014-04-02 22:32:19 +08:00
|
|
|
endif()
|
2014-04-08 18:01:44 +08:00
|
|
|
if(NOT APPLE)
|
|
|
|
if(IPP_X64)
|
|
|
|
if(NOT EXISTS ${INTEL_COMPILER_LIBRARY_DIR}/intel64)
|
|
|
|
message(SEND_ERROR "Intel compiler EM64T libraries not found")
|
|
|
|
endif()
|
|
|
|
set(INTEL_COMPILER_LIBRARY_DIR ${INTEL_COMPILER_LIBRARY_DIR}/intel64)
|
|
|
|
else()
|
|
|
|
if(NOT EXISTS ${INTEL_COMPILER_LIBRARY_DIR}/ia32)
|
|
|
|
message(SEND_ERROR "Intel compiler IA32 libraries not found")
|
|
|
|
endif()
|
|
|
|
set(INTEL_COMPILER_LIBRARY_DIR ${INTEL_COMPILER_LIBRARY_DIR}/ia32)
|
|
|
|
endif()
|
2014-04-04 03:39:01 +08:00
|
|
|
endif()
|
2014-04-08 18:01:44 +08:00
|
|
|
|
|
|
|
macro(_ipp_add_compiler_library name)
|
|
|
|
if (EXISTS ${INTEL_COMPILER_LIBRARY_DIR}/${IPP_LIB_PREFIX}${name}${CMAKE_SHARED_LIBRARY_SUFFIX})
|
|
|
|
list(APPEND IPP_LIBRARIES ${INTEL_COMPILER_LIBRARY_DIR}/${IPP_LIB_PREFIX}${name}${CMAKE_SHARED_LIBRARY_SUFFIX})
|
|
|
|
else()
|
2014-12-12 21:21:47 +08:00
|
|
|
message(STATUS "Can't find compiler library: ${name} at ${INTEL_COMPILER_LIBRARY_DIR}/${IPP_LIB_PREFIX}${name}${CMAKE_SHARED_LIBRARY_SUFFIX}")
|
2014-04-08 18:01:44 +08:00
|
|
|
endif()
|
|
|
|
endmacro()
|
|
|
|
|
|
|
|
_ipp_add_compiler_library(irc)
|
|
|
|
_ipp_add_compiler_library(imf)
|
|
|
|
_ipp_add_compiler_library(svml)
|
2017-01-31 21:39:09 +08:00
|
|
|
endif()
|
2014-04-02 22:32:19 +08:00
|
|
|
endif()
|
|
|
|
|
2017-04-13 20:50:23 +08:00
|
|
|
#message(STATUS "Intel IPP libs: ${IPP_LIBRARIES}")
|
2014-04-02 22:32:19 +08:00
|
|
|
endmacro()
|
|
|
|
|
2014-04-08 18:01:44 +08:00
|
|
|
# OPENCV_IPP_PATH is an environment variable for internal usage only, do not use it
|
|
|
|
if(DEFINED ENV{OPENCV_IPP_PATH} AND NOT DEFINED IPPROOT)
|
|
|
|
set(IPPROOT "$ENV{OPENCV_IPP_PATH}")
|
|
|
|
endif()
|
2017-03-15 18:19:59 +08:00
|
|
|
|
2014-04-08 18:01:44 +08:00
|
|
|
if(NOT DEFINED IPPROOT)
|
2020-02-26 03:04:11 +08:00
|
|
|
if(APPLE AND NOT IPP_X64)
|
|
|
|
message(STATUS "IPPICV: 32-bit binaries are not supported on Apple platform (MacOSX)")
|
|
|
|
return()
|
|
|
|
endif()
|
2017-03-15 18:19:59 +08:00
|
|
|
include("${OpenCV_SOURCE_DIR}/3rdparty/ippicv/ippicv.cmake")
|
2018-10-24 20:02:53 +08:00
|
|
|
download_ippicv(ICV_PACKAGE_ROOT)
|
|
|
|
if(NOT ICV_PACKAGE_ROOT)
|
2014-04-10 19:42:57 +08:00
|
|
|
return()
|
|
|
|
endif()
|
2018-10-24 20:02:53 +08:00
|
|
|
set(IPPROOT "${ICV_PACKAGE_ROOT}/icv")
|
2019-04-02 22:47:03 +08:00
|
|
|
ocv_install_3rdparty_licenses(ippicv "${IPPROOT}/readme.htm")
|
|
|
|
if(WIN32)
|
|
|
|
ocv_install_3rdparty_licenses(ippicv "${ICV_PACKAGE_ROOT}/EULA.rtf")
|
|
|
|
else()
|
|
|
|
ocv_install_3rdparty_licenses(ippicv "${ICV_PACKAGE_ROOT}/EULA.txt")
|
|
|
|
endif()
|
2020-09-26 06:09:25 +08:00
|
|
|
ocv_install_3rdparty_licenses(ippicv "${ICV_PACKAGE_ROOT}/third-party-programs.txt")
|
2014-04-02 22:32:19 +08:00
|
|
|
endif()
|
2012-01-03 21:48:12 +08:00
|
|
|
|
2014-05-13 19:09:10 +08:00
|
|
|
file(TO_CMAKE_PATH "${IPPROOT}" __IPPROOT)
|
|
|
|
if(EXISTS "${__IPPROOT}/include/ippversion.h")
|
|
|
|
set(IPP_ROOT_DIR ${__IPPROOT})
|
2014-04-08 18:01:44 +08:00
|
|
|
ipp_detect_version()
|
2012-05-14 22:56:17 +08:00
|
|
|
endif()
|
2012-01-03 21:48:12 +08:00
|
|
|
|
|
|
|
|
2014-04-02 22:32:19 +08:00
|
|
|
if(WIN32 AND MINGW AND NOT IPP_VERSION_MAJOR LESS 7)
|
2017-04-13 20:50:23 +08:00
|
|
|
# Since Intel IPP built with Microsoft compiler and /GS option
|
2012-05-14 22:56:17 +08:00
|
|
|
# ======================================================
|
|
|
|
# From Windows SDK 7.1
|
|
|
|
# (usually in "C:\Program Files\Microsoft Visual Studio 10.0\VC\lib"),
|
|
|
|
# to avoid undefined reference to __security_cookie and _chkstk:
|
|
|
|
set(MSV_RUNTMCHK "RunTmChk")
|
|
|
|
set(IPP_LIBRARIES ${IPP_LIBRARIES} ${MSV_RUNTMCHK}${IPP_LIB_SUFFIX})
|
|
|
|
|
|
|
|
# To avoid undefined reference to _alldiv and _chkstk
|
|
|
|
# ===================================================
|
|
|
|
# NB: it may require a recompilation of w32api (after having modified
|
|
|
|
# the file ntdll.def) to export the required functions
|
|
|
|
# See http://code.opencv.org/issues/1906 for additional details
|
|
|
|
set(MSV_NTDLL "ntdll")
|
|
|
|
set(IPP_LIBRARIES ${IPP_LIBRARIES} ${MSV_NTDLL}${IPP_LIB_SUFFIX})
|
2013-08-21 21:26:54 +08:00
|
|
|
endif()
|