From 28403628681d366ccb69f51e2dfe84c91860b8be Mon Sep 17 00:00:00 2001 From: Maksim Shabunin Date: Fri, 17 Apr 2020 17:28:42 +0300 Subject: [PATCH] Merge pull request #16769 from mshabunin:fix-ipp-install * Do not copy standalone IPP libraries to install for static builds * Restored IPP installation under option --- cmake/OpenCVFindIPP.cmake | 2 +- cmake/OpenCVFindIPPIW.cmake | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cmake/OpenCVFindIPP.cmake b/cmake/OpenCVFindIPP.cmake index 79555f60d9..59cd497b95 100644 --- a/cmake/OpenCVFindIPP.cmake +++ b/cmake/OpenCVFindIPP.cmake @@ -148,7 +148,7 @@ macro(ipp_detect_version) IMPORTED_LOCATION ${IPP_LIBRARY_DIR}/${IPP_LIB_PREFIX}${IPP_PREFIX}${name}${IPP_SUFFIX}${IPP_LIB_SUFFIX} ) list(APPEND IPP_LIBRARIES ipp${name}) - if (NOT BUILD_SHARED_LIBS) + if (NOT BUILD_SHARED_LIBS AND (HAVE_IPP_ICV OR ";${OPENCV_INSTALL_EXTERNAL_DEPENDENCIES};" MATCHES ";ipp;")) # 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) diff --git a/cmake/OpenCVFindIPPIW.cmake b/cmake/OpenCVFindIPPIW.cmake index 5c3d8a0ea2..1e065e10f6 100644 --- a/cmake/OpenCVFindIPPIW.cmake +++ b/cmake/OpenCVFindIPPIW.cmake @@ -108,12 +108,13 @@ macro(ippiw_setup PATH BUILD) message(STATUS "found Intel IPP Integration Wrappers binaries: ${IW_VERSION_MAJOR}.${IW_VERSION_MINOR}.${IW_VERSION_UPDATE}") message(STATUS "at: ${IPP_IW_PATH}") - add_library(ippiw STATIC IMPORTED) - set_target_properties(ippiw PROPERTIES + add_library(ipp_iw STATIC IMPORTED) + set_target_properties(ipp_iw PROPERTIES IMPORTED_LINK_INTERFACE_LIBRARIES "" IMPORTED_LOCATION "${FILE}" ) - if (NOT BUILD_SHARED_LIBS) + + if (NOT BUILD_SHARED_LIBS AND ";${OPENCV_INSTALL_EXTERNAL_DEPENDENCIES};" MATCHES ";ipp;") # CMake doesn't support "install(TARGETS ${name} ...)" command with imported targets install(FILES "${FILE}" DESTINATION ${OPENCV_3P_LIB_INSTALL_PATH} COMPONENT dev) @@ -122,7 +123,7 @@ macro(ippiw_setup PATH BUILD) endif() set(IPP_IW_INCLUDES "${IPP_IW_PATH}/include") - set(IPP_IW_LIBRARIES ippiw) + set(IPP_IW_LIBRARIES ipp_iw) set(HAVE_IPP_IW 1) set(BUILD_IPP_IW 0)