Commit 1df4cc36 authored by Artur Wojcik's avatar Artur Wojcik Committed by Scott Cyphers

[onnx] fix building while NGRAPH_ONNXIFI_ENABLE is off (#2286)

Signed-off-by: 's avatarArtur Wojcik <artur.wojcik@intel.com>
parent dee4a8b8
......@@ -301,11 +301,9 @@ if (NGRAPH_ONNX_IMPORT_ENABLE)
else()
find_package(Protobuf 2.6.1 REQUIRED)
endif()
if (NGRAPH_ONNXIFI_ENABLE)
include(cmake/external_onnx.cmake)
if (TARGET ext_protobuf)
add_dependencies(ext_onnx ext_protobuf)
endif()
include(cmake/external_onnx.cmake)
if (TARGET ext_protobuf)
add_dependencies(ext_onnx ext_protobuf)
endif()
endif()
......
......@@ -160,13 +160,9 @@ add_library(onnx_import STATIC
set(ONNX_IMPORT_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE INTERNAL "")
add_dependencies(onnx_import_interface onnx::libonnx onnx::libonnx_proto)
add_dependencies(onnx_import onnx_import_interface)
if (NOT NGRAPH_USE_SYSTEM_PROTOBUF)
add_dependencies(onnx_import_interface protobuf::libprotobuf)
add_dependencies(onnx_import_interface onnx::libonnx_proto)
endif()
set_property(TARGET onnx_import PROPERTY POSITION_INDEPENDENT_CODE ON)
target_include_directories(onnx_import PRIVATE ${ONNX_IMPORT_INCLUDE_DIR} ${NGRAPH_INCLUDE_PATH}
SYSTEM PRIVATE ${ONNX_INCLUDE_DIR} ${ONNX_PROTO_INCLUDE_DIR} ${Protobuf_INCLUDE_DIR})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment