yolov4_xiali_turnstile.pro 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. QT -= gui
  2. CONFIG += c++11 console
  3. CONFIG -= app_bundle
  4. TARGET = turnstile_detect
  5. # The following define makes your compiler emit warnings if you use
  6. # any feature of Qt which as been marked deprecated (the exact warnings
  7. # depend on your compiler). Please consult the documentation of the
  8. # deprecated API in order to know how to port your code away from it.
  9. DEFINES += QT_DEPRECATED_WARNINGS
  10. # You can also make your code fail to compile if you use deprecated APIs.
  11. # In order to do so, uncomment the following line.
  12. # You can also select to disable deprecated APIs only up to a certain version of Qt.
  13. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
  14. # project's file
  15. INCLUDEPATH += yolov4Tensorrt/include \
  16. include
  17. SOURCES += yolov4Tensorrt/src/trt_utils.cpp \
  18. yolov4Tensorrt/src/yolo.cpp \
  19. yolov4Tensorrt/src/yolodetect.cpp
  20. CUDA_SOURCES += yolov4Tensorrt/src/mish.cu \
  21. yolov4Tensorrt/src/yololayer.cu
  22. DISTFILES += yolov4Tensorrt/src/mish.cu \
  23. yolov4Tensorrt/src/yololayer.cu
  24. SOURCES += main.cpp \
  25. src/Hungarian.cpp \
  26. src/KalmanTracker.cpp \
  27. src/detect_turnstile.cpp
  28. INCLUDEPATH += proto
  29. SOURCES += \
  30. proto/xiali_turnstile.pb.cc \
  31. proto/rawpic.pb.cc \
  32. proto/signal.pb.cc
  33. # shared memory
  34. INCLUDEPATH += $$PWD/../../../include/msgtype
  35. INCLUDEPATH += $$PWD/../../common/modulecomm/
  36. LIBS += $$PWD/../../../bin/libmodulecomm.so
  37. LIBS += -L"/usr/local/lib" \
  38. -lprotobuf
  39. # opencv
  40. INCLUDEPATH += /usr/include/opencv4
  41. LIBS += /usr/lib/aarch64-linux-gnu/libopencv_*.so
  42. # tensorrt
  43. LIBS += /usr/lib/aarch64-linux-gnu/libnvinfer.so \
  44. /usr/lib/aarch64-linux-gnu/libnvinfer_plugin.so
  45. # c++
  46. LIBS += -L/usr/lib/aarch64-linux-gnu -lstdc++fs
  47. # cuda
  48. CUDA_SDK = "/usr/local/cuda" # Path to cuda SDK install
  49. CUDA_DIR = "/usr/local/cuda" # Path to cuda toolkit install
  50. #####系统类型,计算能力###########
  51. SYSTEM_NAME = linux # Depending on your system either 'Win32', 'x64', or 'Win64'
  52. SYSTEM_TYPE = 64 # '32' or '64', depending on your system
  53. CUDA_ARCH = sm_72 # Type of CUDA architecture, for example 'compute_10', 'compute_11', 'sm_10'
  54. NVCC_OPTIONS = --use_fast_math
  55. INCLUDEPATH += $$CUDA_DIR/include
  56. QMAKE_LIBDIR += $$CUDA_DIR/lib64/
  57. CUDA_OBJECTS_DIR = ./
  58. # Add the necessary libraries
  59. CUDA_LIBS = -lcuda -lcudart #-lcublas
  60. # The following makes sure all path names (which often include spaces) are put between quotation marks
  61. CUDA_INC = $$join(INCLUDEPATH,'" -I"','-I"','"')
  62. LIBS += $$CUDA_LIBS
  63. # Configuration of the Cuda compiler
  64. CONFIG(debug, debug|release) {
  65. # Debug mode
  66. cuda_d.input = CUDA_SOURCES
  67. cuda_d.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}.o
  68. 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}
  69. cuda_d.dependency_type = TYPE_C
  70. QMAKE_EXTRA_COMPILERS += cuda_d
  71. }
  72. else {
  73. # Release mode
  74. cuda.input = CUDA_SOURCES
  75. cuda.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}.o
  76. 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}
  77. cuda.dependency_type = TYPE_C
  78. QMAKE_EXTRA_COMPILERS += cuda
  79. }