1 Star 2 Fork 0

Trisoil/Yolo_To_TR

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
CMakeLists.txt 1.88 KB
一键复制 编辑 原始数据 按行查看 历史
lightonthefloor 提交于 2022-12-05 21:01 . Initial commit
cmake_minimum_required(VERSION 3.13)
project(yolov5)
add_definitions(-std=c++14)
add_definitions(-DAPI_EXPORTS)
option(CUDA_USE_STATIC_CUDA_RUNTIME OFF)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_BUILD_TYPE Debug)
find_package(CUDA REQUIRED)
if(WIN32)
enable_language(CUDA)
endif(WIN32)
include_directories(${PROJECT_SOURCE_DIR}/include)
# include and link dirs of cuda and tensorrt, you need adapt them if yours are different
# cuda
include_directories(/usr/local/cuda/include)
link_directories(/usr/local/cuda/lib64)
# tensorrt
include_directories(/usr/include/aarch64-linux-gnu/)
link_directories(/usr/lib/aarch64-linux-gnu/)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Ofast -g -Wfatal-errors -D_MWAITXINTRIN_H_INCLUDED")
cuda_add_library(myplugins SHARED yololayer.cu)
target_link_libraries(myplugins nvinfer cudart)
find_package(OpenCV REQUIRED)
include_directories(${OpenCV_INCLUDE_DIRS})
include_directories(/opt/MVS/include)
link_directories(${OpenCV_LIBRARY_DIRS})
link_directories("/opt/MVS/lib/aarch64")
link_libraries("/opt/MVS/lib/aarch64/libMvCameraControl.so")
cuda_add_executable(yolov5 calibrator.cpp yolov5.cpp preprocess.cu serialPort.cpp serialPort.hpp HIKCam.cpp HIKCam.hpp)
target_link_libraries(yolov5 nvinfer)
target_link_libraries(yolov5 cudart)
target_link_libraries(yolov5 myplugins)
target_link_libraries(yolov5 ${OpenCV_LIBS})
target_link_libraries(yolov5 -lMvCameraControl)
target_link_libraries(yolov5 libMvCameraControl.so)
add_executable(yolov5-cls calibrator.cpp yolov5_cls.cpp serialPort.cpp serialPort.hpp HIKCam.cpp HIKCam.hpp)
target_link_libraries(yolov5-cls nvinfer)
target_link_libraries(yolov5-cls cudart)
target_link_libraries(yolov5-cls myplugins)
target_link_libraries(yolov5-cls ${OpenCV_LIBS})
target_link_libraries(yolov5-cls -lMvCameraControl)
target_link_libraries(yolov5-cls libMvCameraControl.so)
if(UNIX)
add_definitions(-O3 -pthread)
endif(UNIX)
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/trisoill/Yolo_To_TR.git
git@gitee.com:trisoill/Yolo_To_TR.git
trisoill
Yolo_To_TR
Yolo_To_TR
main

搜索帮助