From 064d48771de57a06c46bc66997603fbbd3a01eb6 Mon Sep 17 00:00:00 2001 From: Ilya Lavrenov Date: Wed, 23 Dec 2020 09:51:23 +0300 Subject: [PATCH] Find only shared IE libraries, not plugins original commit: 3ed376d10377eece4c2dba6e0bdee53451da14ed --- cmake/OpenCVDetectInferenceEngine.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/OpenCVDetectInferenceEngine.cmake b/cmake/OpenCVDetectInferenceEngine.cmake index 9af1051fa0..34f3df17dc 100644 --- a/cmake/OpenCVDetectInferenceEngine.cmake +++ b/cmake/OpenCVDetectInferenceEngine.cmake @@ -68,7 +68,13 @@ function(add_custom_ie_build _inc _lib _lib_rel _lib_dbg _msg) if(find_prefix STREQUAL "_empty_") # foreach doesn't iterate over empty elements set(find_prefix "") endif() - foreach(find_suffix ${CMAKE_FIND_LIBRARY_SUFFIXES}) + if(NOT DEFINED INFERENCE_ENGINE_FIND_LIBRARY_SUFFIXES) # allow custom override + set(INFERENCE_ENGINE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES}) + if(APPLE) + ocv_list_filterout(INFERENCE_ENGINE_FIND_LIBRARY_SUFFIXES "^.so$") # skip plugins (can't be linked) + endif() + endif() + foreach(find_suffix ${INFERENCE_ENGINE_FIND_LIBRARY_SUFFIXES}) ocv_ie_find_extra_libraries("${find_prefix}" "${find_suffix}") endforeach() if(NOT CMAKE_FIND_LIBRARY_SUFFIXES)