123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
- QT -= gui
- CONFIG += c++11 console
- CONFIG -= app_bundle
- TARGET = turnstile_detect
- # The following define makes your compiler emit warnings if you use
- # any feature of Qt which as 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 you use 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
- # project's file
- INCLUDEPATH += yolov4Tensorrt/include \
- include
- SOURCES += yolov4Tensorrt/src/trt_utils.cpp \
- yolov4Tensorrt/src/yolo.cpp \
- yolov4Tensorrt/src/yolodetect.cpp
- CUDA_SOURCES += yolov4Tensorrt/src/mish.cu \
- yolov4Tensorrt/src/yololayer.cu
- DISTFILES += yolov4Tensorrt/src/mish.cu \
- yolov4Tensorrt/src/yololayer.cu
- SOURCES += main.cpp \
- src/Hungarian.cpp \
- src/KalmanTracker.cpp \
- src/detect_turnstile.cpp
- INCLUDEPATH += proto
- SOURCES += \
- proto/xiali_turnstile.pb.cc \
- proto/rawpic.pb.cc \
- proto/signal.pb.cc
- # shared memory
- INCLUDEPATH += $$PWD/../../../include/msgtype
- INCLUDEPATH += $$PWD/../../common/modulecomm/
- LIBS += $$PWD/../../../bin/libmodulecomm.so
- 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
- #####系统类型,计算能力###########
- 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
- }
|