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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user