Skip to content

Commit

Permalink
Fix support for using OpenVINO as a subproject (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
Frank Laub authored and YangleiZouIntel committed Jan 14, 2021
1 parent d008ab0 commit 5f8bb31
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 5 deletions.
8 changes: 6 additions & 2 deletions docs/template_extension/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ set(CMAKE_CXX_STANDARD 11)

set(TARGET_NAME "template_extension")

find_package(ngraph REQUIRED OPTIONAL_COMPONENTS onnx_importer)
find_package(InferenceEngine REQUIRED)
if(NOT TARGET ngraph)
find_package(ngraph REQUIRED OPTIONAL_COMPONENTS onnx_importer)
endif()
if(NOT TARGET InferenceEngine)
find_package(InferenceEngine REQUIRED)
endif()

file(GLOB_RECURSE SRC *.cpp)

Expand Down
4 changes: 3 additions & 1 deletion inference-engine/samples/hello_reshape_ssd/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,7 @@ ie_add_sample(NAME hello_reshape_ssd
HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/reshape_ssd_extension.hpp"
OPENCV_DEPENDENCIES imgcodecs)

find_package(ngraph REQUIRED)
if(NOT TARGET ngraph)
find_package(ngraph REQUIRED)
endif()
target_link_libraries(hello_reshape_ssd PRIVATE ${NGRAPH_LIBRARIES})
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ ie_add_sample(NAME ngraph_function_creation_sample
HEADERS ${MAIN_HEADERS}
DEPENDENCIES format_reader)

find_package(ngraph REQUIRED)
if(NOT TARGET ngraph)
find_package(ngraph REQUIRED)
endif()
target_link_libraries(${TARGET_NAME} PRIVATE ${NGRAPH_LIBRARIES})
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,7 @@ ie_add_sample(NAME object_detection_sample_ssd
HEADERS "${CMAKE_CURRENT_SOURCE_DIR}/object_detection_sample_ssd.h"
DEPENDENCIES format_reader)

find_package(ngraph REQUIRED)
if(NOT TARGET ngraph)
find_package(ngraph REQUIRED)
endif()
target_link_libraries(object_detection_sample_ssd PRIVATE ${NGRAPH_LIBRARIES})

0 comments on commit 5f8bb31

Please sign in to comment.