代码拉取完成,页面将自动刷新
cmake_minimum_required(VERSION 3.5)
project(detect_test)
set(CMAKE_CXX_STANDARD 14)
include_directories(
#OpenVINO推理引擎的头文件
/opt/intel/openvino_2021/deployment_tools/inference_engine/include/
/opt/intel/openvino_2021/deployment_tools/ngraph/include/
)
#查找必要的依赖包
find_package(OpenCV REQUIRED)
set(TBB_DIR /opt/intel/openvino_2021/deployment_tools/inference_engine/external/tbb/cmake)
find_package(TBB)
set(InferenceEngine_DIR "/opt/intel/openvino_2021/deployment_tools/inference_engine/share")
find_package(InferenceEngine)
set(ngraph_DIR "/opt/intel/openvino_2021/deployment_tools/ngraph")
find_package(ngraph REQUIRED)
set(ngraph_LIBRARIES "/opt/intel/openvino_2021/deployment_tools/ngraph/lib/libngraph.so")
set(ngraph_INCLUDE_DIRS "/opt/intel/openvino_2021/deployment_tools/ngraph/include/")
# 编译detector_bbox.so
add_library (detector_bbox SHARED ${CMAKE_CURRENT_SOURCE_DIR}/yolo_object_detection.cpp)
target_include_directories(detector_bbox
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include
PUBLIC ${OpenCV_INCLUDE_DIR}
PUBLIC ${InferenceEngine_INCLUDE_DIRS}
# PUBLIC ${ngraph_INCLUDE_DIRS}
)
target_link_libraries(detector_bbox
${OpenCV_LIBS}
${InferenceEngine_LIBRARIES}
${ngraph_LIBRARIES}
dl
)
add_executable(detect_test ConsoleApplication1.cpp) #run.cpp
target_link_libraries(detect_test
${OpenCV_LIBS}
detector_bbox
)
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。