Files
openvino/cmake/templates/ngraphConfig.cmake.in
T
Mikhail Nosov 2245ea8be2 [FrontEnd] Rename all frontends from "*_ngraph_frontend*" to "_ov_frontend*" (#8645)
* Renaming all frontends from "*_ngraph_frontend*" to "_ov_frontend*"

Also Debug builds on Windows release frontends without "d" suffix will not be loaded

* Fix review comments and add wheels test debug prints

* More debug prints

* Load by absolute path and remove debug prints
2021-11-18 09:26:13 +03:00

101 lines
4.0 KiB
CMake

# ******************************************************************************
# Copyright 2017-2021 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::frontend_manager - nGraph frontend manager
#
# ngraph_onnx_ov_frontend_FOUND - True if the system has onnx_ov_frontend library
# ngraph::onnx_ov_frontend - ONNX FrontEnd target (optional)
#
# ngraph_paddlepaddle_frontend_FOUND - True if the system has PDPD frontend
# ngraph::paddlepaddle_ov_frontend - nGraph PDPD 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::core AND NOT TARGET ngraph::ngraph)
add_library(ngraph::ngraph INTERFACE IMPORTED)
set_target_properties(ngraph::ngraph PROPERTIES
INTERFACE_LINK_LIBRARIES openvino::core)
endif()
if(TARGET openvino::frontend::manager AND NOT TARGET ngraph::frontend_manager)
add_library(ngraph::frontend_manager INTERFACE IMPORTED)
set_target_properties(ngraph::frontend_manager PROPERTIES
INTERFACE_LINK_LIBRARIES openvino::frontend::manager)
endif()
if(TARGET openvino::frontend::onnx AND NOT TARGET ngraph::onnx_ov_frontend)
add_library(ngraph::onnx_ov_frontend INTERFACE IMPORTED)
set_target_properties(ngraph::onnx_ov_frontend PROPERTIES
INTERFACE_LINK_LIBRARIES openvino::frontend::onnx)
endif()
if(TARGET openvino::frontend::paddlepaddle AND NOT TARGET ngraph::paddlepaddle_ov_frontend)
add_library(ngraph::paddlepaddle_ov_frontend INTERFACE IMPORTED)
set_target_properties(ngraph::paddlepaddle_ov_frontend PROPERTIES
INTERFACE_LINK_LIBRARIES openvino::frontend::paddlepaddle)
endif()
if(TARGET openvino::frontend::tensorflow AND NOT TARGET ngraph::tensorflow_ov_frontend)
add_library(ngraph::tensorflow_ov_frontend INTERFACE IMPORTED)
set_target_properties(ngraph::tensorflow_ov_frontend PROPERTIES
INTERFACE_LINK_LIBRARIES openvino::frontend::tensorflow)
endif()
set(ngraph_ngraph_FOUND ON)
set(NGRAPH_LIBRARIES ngraph::ngraph)
set(ngraph_onnx_ov_frontend_FOUND ${OpenVINO_Frontend_ONNX_FOUND})
set(ngraph_onnx_importer_FOUND ${OpenVINO_Frontend_ONNX_FOUND})
if(ngraph_onnx_importer_FOUND)
set(ONNX_IMPORTER_LIBRARIES ngraph::onnx_ov_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_ov_frontend)
endif()
endif()
set(ngraph_paddlepaddle_frontend_FOUND ${OpenVINO_Frontend_PaddlePaddle_FOUND})
set(ngraph_tensorflow_frontend_FOUND ${OpenVINO_Frontend_TensorFlow_FOUND})
set(ngraph_ir_frontend_FOUND ${OpenVINO_Frontend_IR_FOUND})
check_required_components(ngraph)