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

发布时间:2024年01月12日

我的sdk在OpenCV003项目里:
在这里插入图片描述
在这里插入图片描述
pro中添加

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
文章来源:https://blog.csdn.net/qq_34974229/article/details/135548960
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。