# ****************************************************************************** # Copyright 2017-2022 Intel Corporation # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # ****************************************************************************** # # # FindNGraph # ------ # # This script defines the following variables and imported targets: # # ngraph::ngraph - nGraph core target # ngraph_FOUND - True if the system has the nGraph library # NGRAPH_LIBRARIES - nGraph libraries # # Frontends: # # ngraph_onnx_frontend_FOUND - True if the system has ngraph::onnx_frontend library # ngraph::onnx_frontend - ONNX FrontEnd target (optional) # # ngraph_paddle_frontend_FOUND - True if the system has Paddle frontend # ngraph::paddle_frontend - nGraph Paddle frontend (optional) # # ngraph_ir_frontend_FOUND - True if the system has OpenVINO IR frontend # # ngraph_tensorflow_frontend_FOUND - True if the system has TensorFlow frontend # ngraph::tensorflow_frontend - nGraph TensorFlow frontend (optional) # @PACKAGE_INIT@ include(CMakeFindDependencyMacro) find_dependency(OpenVINO PATHS "${CMAKE_CURRENT_LIST_DIR}" "${CMAKE_CURRENT_LIST_DIR}/ngraph" NO_CMAKE_FIND_ROOT_PATH NO_DEFAULT_PATH) # create targets with old names for compatibility if(TARGET openvino::runtime AND NOT TARGET ngraph::ngraph) add_library(ngraph::ngraph INTERFACE IMPORTED) set_target_properties(ngraph::ngraph PROPERTIES INTERFACE_LINK_LIBRARIES openvino::runtime) endif() if(TARGET openvino::frontend::onnx AND NOT TARGET ngraph::onnx_frontend) add_library(ngraph::onnx_frontend INTERFACE IMPORTED) set_target_properties(ngraph::onnx_frontend PROPERTIES INTERFACE_LINK_LIBRARIES openvino::frontend::onnx) endif() if(TARGET openvino::frontend::paddle AND NOT TARGET ngraph::paddle_frontend) add_library(ngraph::paddle_frontend INTERFACE IMPORTED) set_target_properties(ngraph::paddle_frontend PROPERTIES INTERFACE_LINK_LIBRARIES openvino::frontend::paddle) endif() if(TARGET openvino::frontend::tensorflow AND NOT TARGET ngraph::tensorflow_frontend) add_library(ngraph::tensorflow_frontend INTERFACE IMPORTED) set_target_properties(ngraph::tensorflow_frontend PROPERTIES INTERFACE_LINK_LIBRARIES openvino::frontend::tensorflow) endif() set(ngraph_ngraph_FOUND ON) set(NGRAPH_LIBRARIES ngraph::ngraph) set(ngraph_onnx_frontend_FOUND ${OpenVINO_Frontend_ONNX_FOUND}) set(ngraph_tensorflow_frontend_FOUND ${OpenVINO_Frontend_TensorFlow_FOUND}) set(ngraph_paddle_frontend_FOUND ${OpenVINO_Frontend_Paddle_FOUND}) set(ngraph_onnx_importer_FOUND ${OpenVINO_Frontend_ONNX_FOUND}) if(ngraph_onnx_importer_FOUND) set(ONNX_IMPORTER_LIBRARIES ngraph::onnx_frontend) # ngraph::onnx_importer target and variables are deprecated # but need to create a dummy target for BW compatibility if(NOT TARGET ngraph::onnx_importer) add_library(ngraph::onnx_importer INTERFACE IMPORTED) set_target_properties(ngraph::onnx_importer PROPERTIES INTERFACE_LINK_LIBRARIES ngraph::onnx_frontend) endif() endif() set(ngraph_paddle_frontend_FOUND ${OpenVINO_Frontend_Paddle_FOUND}) set(ngraph_tensorflow_frontend_FOUND ${OpenVINO_Frontend_TensorFlow_FOUND}) set(ngraph_onnx_frontend_FOUND ${OpenVINO_Frontend_ONNX_FOUND}) set(ngraph_ir_frontend_FOUND ${OpenVINO_Frontend_IR_FOUND}) check_required_components(ngraph)