1
0
mirror of https://github.com/opencv/opencv.git synced 2026-07-30 07:43:03 +04:00

Merge pull request #20673 from ilya-lavrenov:print-openvino-information

* Support of OpenVINO interface libraries

* cmake: rename and move ocv_get_imported_target to OpenCVUtils.cmake
This commit is contained in:
Ilya Lavrenov
2021-09-09 10:56:34 +03:00
committed by GitHub
parent 5ac5da3524
commit c703f1eed6
2 changed files with 14 additions and 1 deletions
+12
View File
@@ -1619,6 +1619,18 @@ function(ocv_add_external_target name inc link def)
endif()
endfunction()
# Returns the first non-interface target
function(ocv_get_imported_target imported interface)
set(__result "${interface}")
get_target_property(__type "${__result}" TYPE)
if(__type STREQUAL "INTERFACE_LIBRARY")
get_target_property(__libs "${__result}" INTERFACE_LINK_LIBRARIES)
list(GET __libs 0 __interface)
ocv_get_imported_target(__result "${__interface}")
endif()
set(${imported} "${__result}" PARENT_SCOPE)
endfunction()
macro(ocv_get_libname var_name)
get_filename_component(__libname "${ARGN}" NAME)