Skip to content

Commit 1ec2ade

Browse files
committed
Merge pull request opencv#19210 from alalek:backport_19199
2 parents 13148df + 064d487 commit 1ec2ade

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

cmake/OpenCVDetectInferenceEngine.cmake

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,13 @@ function(add_custom_ie_build _inc _lib _lib_rel _lib_dbg _msg)
6868
if(find_prefix STREQUAL "_empty_") # foreach doesn't iterate over empty elements
6969
set(find_prefix "")
7070
endif()
71-
foreach(find_suffix ${CMAKE_FIND_LIBRARY_SUFFIXES})
71+
if(NOT DEFINED INFERENCE_ENGINE_FIND_LIBRARY_SUFFIXES) # allow custom override
72+
set(INFERENCE_ENGINE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
73+
if(APPLE)
74+
ocv_list_filterout(INFERENCE_ENGINE_FIND_LIBRARY_SUFFIXES "^.so$") # skip plugins (can't be linked)
75+
endif()
76+
endif()
77+
foreach(find_suffix ${INFERENCE_ENGINE_FIND_LIBRARY_SUFFIXES})
7278
ocv_ie_find_extra_libraries("${find_prefix}" "${find_suffix}")
7379
endforeach()
7480
if(NOT CMAKE_FIND_LIBRARY_SUFFIXES)

0 commit comments

Comments
 (0)