【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
相关推荐
马里马里奥-20 小时前
从零搭建AI Agent工具链的技术文章大纲
开发语言·qt
Quz1 天前
QML 与 JavaScript 交互方式:内联函数、外部文件、信号槽与工作线程
javascript·qt
Quz1 天前
QML ToolTip 组件:延迟提示与自定义外观
qt
wWYy.1 天前
RPC详解
qt·rpc·php
Fu_Lin_1 天前
Qt嵌入式从零基础到精通(01):Qt嵌入式开发全景图:从桌面Qt到ARM Linux
linux·arm开发·qt·qt5·嵌入式linux
海清河晏1111 天前
Qt实战:从零构建美化登录界面
开发语言·c++·qt
Fu_Lin_1 天前
《Qt嵌入式从零基础到精通》前言与阅读指南
开发语言·qt
Eason_CM1 天前
QT学习教程与实战三:控件与QT Designer
c++·windows·qt·visual studio
mabing9932 天前
Qt 生成条纹图
开发语言·qt
Fu_Lin_2 天前
Qt 嵌入式从零基础到精通总纲
开发语言·qt·嵌入式·qt嵌入式