QT += core gui widgets greaterThan(QT_MAJOR_VERSION, 4): QT += widgets CONFIG += c++11 DEFINES += OPENCV DEFINES += GPU DEFINES += CUDNN # You can make your code fail to compile if it uses deprecated APIs. # In order to do so, uncomment the following line. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 # 包含 OpenCV 的头文件路径 INCLUDEPATH += /usr/local/Opencv-4.10.0/include/opencv4 # 包含 Cuda 的头文件路径 INCLUDEPATH += /usr/local/cuda-12.6/include # 包含 onnx 的头文件路径 INCLUDEPATH += /usr/local/include/onnxruntime # 链接到 OpenCV 的库文件 LIBS += -L/usr/local/Opencv-4.10.0/lib \ -lopencv_core \ -lopencv_imgproc \ -lopencv_highgui \ -lopencv_imgcodecs \ -lopencv_videoio # 链接到 onnx 的库文件 LIBS += -L/usr/local/lib -lonnxruntime SOURCES += \ YOLOPv2.cpp \ main.cpp \ mainwindow.cpp HEADERS += \ YOLOPv2.h \ mainwindow.h FORMS += \ mainwindow.ui # Default rules for deployment. qnx: target.path = /tmp/$${TARGET}/bin else: unix:!android: target.path = /opt/$${TARGET}/bin !isEmpty(target.path): INSTALLS += target