Merge pull request #19199 from ilya-lavrenov:find-shared-libraries-only

This commit is contained in:
Alexander Alekhin 2020-12-23 08:33:49 +00:00
commit ed00088f17

View File

@ -62,7 +62,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)