From 882f46e1d30c30db1b53d0eca4f188a7f8cc30a9 Mon Sep 17 00:00:00 2001 From: JunX Date: Fri, 19 Apr 2024 16:55:17 +0800 Subject: [PATCH] Merge pull request #25317 from junxnone:ipp_202110 Fix for IPP 2021.10 with OneAPI 2024 #25317 fixes #25270 ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work - [ ] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name. - [x] The feature is well documented and sample code can be built with the project CMake --- cmake/OpenCVFindIPP.cmake | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmake/OpenCVFindIPP.cmake b/cmake/OpenCVFindIPP.cmake index 6bcd81d8b4..2328ef8b43 100644 --- a/cmake/OpenCVFindIPP.cmake +++ b/cmake/OpenCVFindIPP.cmake @@ -84,7 +84,7 @@ 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) + get_filename_component(IPP_INCLUDE_DIRS ${IPP_VERSION_FILE} PATH) set(__msg) if(EXISTS ${IPP_ROOT_DIR}/include/ippicv_redefs.h) @@ -271,7 +271,9 @@ if(NOT DEFINED IPPROOT) endif() file(TO_CMAKE_PATH "${IPPROOT}" __IPPROOT) -if(EXISTS "${__IPPROOT}/include/ippversion.h") +file(GLOB_RECURSE IPP_VERSION_FILE "${__IPPROOT}/include/*ippversion.h") + +if(EXISTS ${IPP_VERSION_FILE}) set(IPP_ROOT_DIR ${__IPPROOT}) ipp_detect_version() endif()