mirror of
https://github.com/opencv/opencv.git
synced 2025-01-18 22:44:02 +08: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:
parent
5ac5da3524
commit
c703f1eed6
@ -1526,6 +1526,7 @@ if(WITH_INF_ENGINE OR INF_ENGINE_TARGET)
|
||||
if(INF_ENGINE_TARGET)
|
||||
list(GET INF_ENGINE_TARGET 0 ie_target)
|
||||
set(__msg "YES (${INF_ENGINE_RELEASE} / ${INF_ENGINE_VERSION})")
|
||||
ocv_get_imported_target(ie_target "${ie_target}")
|
||||
get_target_property(_lib ${ie_target} IMPORTED_LOCATION)
|
||||
get_target_property(_lib_imp_rel ${ie_target} IMPORTED_IMPLIB_RELEASE)
|
||||
get_target_property(_lib_imp_dbg ${ie_target} IMPORTED_IMPLIB_DEBUG)
|
||||
@ -1549,7 +1550,7 @@ if(WITH_INF_ENGINE OR INF_ENGINE_TARGET)
|
||||
endif()
|
||||
if(WITH_NGRAPH OR HAVE_NGRAPH)
|
||||
if(HAVE_NGRAPH)
|
||||
set(__target ngraph::ngraph)
|
||||
ocv_get_imported_target(__target ngraph::ngraph)
|
||||
set(__msg "YES (${ngraph_VERSION})")
|
||||
get_target_property(_lib ${__target} IMPORTED_LOCATION)
|
||||
get_target_property(_lib_imp_rel ${__target} IMPORTED_IMPLIB_RELEASE)
|
||||
|
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user