【qt】sdk写pro写法,cv,onnx,cudnn

我的sdk在OpenCV003项目里:

pro中添加

cpp 复制代码
CONFIG(release, debug|release) {
    LIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntime
    LIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntime_providers_cuda
    LIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntime_providers_shared
    LIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntime_providers_tensorrt
    LIBS += -L$$PWD/sdk/opencv/lib/ -lopencv_world470
}
else {
    LIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntime
    LIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntime_providers_cuda
    LIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntime_providers_shared
    LIBS += -L$$PWD/sdk/onnxruntime-x64-gpu/lib/ -lonnxruntime_providers_tensorrt
    LIBS += -L$$PWD/sdk/opencv/lib/ -lopencv_world470d
}

INCLUDEPATH += $$PWD/sdk/onnxruntime-x64-gpu/include
INCLUDEPATH += $$PWD/sdk/opencv/include

CONFIG(release, debug|release) {
    onnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime.dll
    onnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime_providers_cuda.dll
    onnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime_providers_shared.dll
    onnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime_providers_tensorrt.dll
    opencv.files += $$PWD/sdk/opencv/bin/opencv_world470.dll
}
else {
    onnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime.dll
    onnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime_providers_cuda.dll
    onnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime_providers_shared.dll
    onnxruntime.files += $$PWD/sdk/onnxruntime-x64-gpu/bin/onnxruntime_providers_tensorrt.dll
    opencv.files += $$PWD/sdk/opencv/bin/opencv_world470d.dll
}


CONFIG(release, debug|release) {
    onnxruntime.path += $$OUT_PWD/Release
    opencv.path += $$OUT_PWD/Release
}
else {
    onnxruntime.path += $$OUT_PWD/Debug
    opencv.path += $$OUT_PWD/Debug
}

COPIES += onnxruntime
COPIES += opencv
相关推荐
我是菜鸟0713号1 天前
Qt 中 OPC UA 通讯实战
开发语言·qt
JCBP_1 天前
QT(4)
开发语言·汇编·c++·qt·算法
lqjun08271 天前
Qt程序单独运行报错问题
开发语言·qt
酷飞飞2 天前
Qt Designer与事件处理
开发语言·qt·命令模式
mkhase2 天前
9.12-QT-基本登陆界面实现
java·jvm·qt
咕噜咕噜啦啦2 天前
Qt之快捷键、事件处理、自定义按键——完成记事本项目
开发语言·qt
Quz2 天前
QML Charts组件之折线图的鼠标交互
qt
眠りたいです2 天前
基于脚手架微服务的视频点播系统-数据管理与网络通信部分的预备工作
c++·qt·ui·微服务·云原生·架构·媒体
bikong72 天前
Qt/C++,windows多进程demo
c++·windows·qt
油炸自行车2 天前
【Qt】Window环境下搭建Qt6、MSVC2022开发环境(无需提前安装Visual Studio)
qt·visual studio·qt6·msvc2022·qt creator 17.0