123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122 |
- QT -= gui
- CONFIG += c++11 console
- CONFIG -= app_bundle
- # The following define makes your compiler emit warnings if you use
- # any Qt feature that has been marked deprecated (the exact warnings
- # depend on your compiler). Please consult the documentation of the
- # deprecated API in order to know how to port your code away from it.
- DEFINES += QT_DEPRECATED_WARNINGS
- # You can also make your code fail to compile if it uses deprecated APIs.
- # In order to do so, uncomment the following line.
- # You can also select to disable deprecated APIs only up to a certain version of Qt.
- #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
- # Default rules for deployment.
- qnx: target.path = /tmp/$${TARGET}/bin
- else: unix:!android: target.path = /opt/$${TARGET}/bin
- !isEmpty(target.path): INSTALLS += target
- SOURCES += main.cpp \
- src/Hungarian.cpp \
- src/KalmanTracker.cpp \
- src/detect_obstacle.cpp\
- $$PWD/../../include/msgtype/rawpic.pb.cc \
- $$PWD/../../include/msgtype/lightarray.pb.cc
- INCLUDEPATH += include
- HEADERS += include/yolo.hpp \
- include/infer.hpp \
- include/cpm.hpp \
- include/imageBuffer.h \
- include/Hungarian.h \
- include/KalmanTracker.h \
- include/detect_obstacle.h
- CUDA_SOURCES += src/infer.cu \
- src/yolo.cu
- DISTFILES += src/infer.cu \
- src/yolo.cu
- LIBS += -L"/usr/local/lib" \
- -lprotobuf
- # opencv
- INCLUDEPATH += /usr/include/opencv4
- LIBS += /usr/lib/aarch64-linux-gnu/libopencv_*.so
- # tensorrt
- LIBS += /usr/lib/aarch64-linux-gnu/libnvinfer.so \
- /usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so
- # c++
- LIBS += -L/usr/lib/aarch64-linux-gnu -lstdc++fs
- # cuda
- CUDA_SDK = "/usr/local/cuda" # Path to cuda SDK install
- CUDA_DIR = "/usr/local/cuda" # Path to cuda toolkit install
- INCLUDEPATH += ../../../include
- LIBS += $$PWD/../../../bin/libxmlparam.so \
- $$PWD/../../../bin/libivlog.so \
- $$PWD/../../../bin/libivfault.so \
- $$PWD/../../../bin/libmodulecomm.so
- !include(../../../include/common.pri ) {
- error( "Couldn't find the common.pri file!" )
- }
- !include(../../../include/ivprotobuf.pri ) {
- error( "Couldn't find the ivprotobuf.pri file!" )
- }
- !include(../../../include/ivopencv.pri ) {
- error( "Couldn't find the ivopencv.pri file!" )
- }
- INCLUDEPATH += $$PWD/../../include/msgtype
- LIBS += -L/usr/lib/aarch64-linux-gnu/ -lglog
- #####系统类型,计算能力###########
- SYSTEM_NAME = linux # Depending on your system either 'Win32', 'x64', or 'Win64'
- SYSTEM_TYPE = 64 # '32' or '64', depending on your system
- CUDA_ARCH = sm_72 # Type of CUDA architecture, for example 'compute_10', 'compute_11', 'sm_10'
- NVCC_OPTIONS = --use_fast_math
- INCLUDEPATH += $$CUDA_DIR/include
- QMAKE_LIBDIR += $$CUDA_DIR/lib64/
- CUDA_OBJECTS_DIR = ./
- # Add the necessary libraries
- CUDA_LIBS = -lcuda -lcudart #-lcublas
- # The following makes sure all path names (which often include spaces) are put between quotation marks
- CUDA_INC = $$join(INCLUDEPATH,'" -I"','-I"','"')
- LIBS += $$CUDA_LIBS
- # Configuration of the Cuda compiler
- CONFIG(debug, debug|release) {
- # Debug mode
- cuda_d.input = CUDA_SOURCES
- cuda_d.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}.o
- cuda_d.commands = $$CUDA_DIR/bin/nvcc -D_DEBUG $$NVCC_OPTIONS $$CUDA_INC $$NVCC_LIBS --machine $$SYSTEM_TYPE -arch=$$CUDA_ARCH -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
- cuda_d.dependency_type = TYPE_C
- QMAKE_EXTRA_COMPILERS += cuda_d
- }
- else {
- # Release mode
- cuda.input = CUDA_SOURCES
- cuda.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}.o
- cuda.commands = $$CUDA_DIR/bin/nvcc $$NVCC_OPTIONS $$CUDA_INC $$NVCC_LIBS --machine $$SYSTEM_TYPE -arch=$$CUDA_ARCH -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
- cuda.dependency_type = TYPE_C
- QMAKE_EXTRA_COMPILERS += cuda
- }
|