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

我的sdk在OpenCV003项目里:
【qt】sdk写pro写法,cv,onnx,cudnn_第1张图片
【qt】sdk写pro写法,cv,onnx,cudnn_第2张图片
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

你可能感兴趣的:(qt)