detection_lidar_PointPillars_MultiHead.pro 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. QT -= gui
  2. CONFIG += c++14 console
  3. CONFIG -= app_bundle
  4. QMAKE_CXXFLAGS += -std=gnu++17
  5. QMAKE_LFLAGS += -no-pie -Wl,--no-as-needed
  6. # The following define makes your compiler emit warnings if you use
  7. # any feature of Qt which as been marked deprecated (the exact warnings
  8. # depend on your compiler). Please consult the documentation of the
  9. # deprecated API in order to know how to port your code away from it.
  10. DEFINES += QT_DEPRECATED_WARNINGS
  11. #DEFINES += DEBUG_SHOW
  12. # You can also make your code fail to compile if you use deprecated APIs.
  13. # In order to do so, uncomment the following line.
  14. # You can also select to disable deprecated APIs only up to a certain version of Qt.
  15. #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
  16. SOURCES += main.cpp \
  17. pointpillars.cc \
  18. ../../include/msgtype/object.pb.cc \
  19. ../../include/msgtype/objectarray.pb.cc \
  20. Tracker/Ctracker.cpp \
  21. Tracker/HungarianAlg.cpp \
  22. Tracker/Kalman.cpp \
  23. Tracker/track.cpp
  24. DISTFILES += \
  25. nms.cu \
  26. postprocess.cu \
  27. preprocess.cu \
  28. scatter.cu \
  29. roiaware_pool3d_kernel.cu
  30. HEADERS += \
  31. common.h \
  32. nms.h \
  33. pointpillars.h \
  34. postprocess.h \
  35. preprocess.h \
  36. scatter.h \
  37. ../../include/msgtype/object.pb.h \
  38. ../../include/msgtype/objectarray.pb.h \
  39. Tracker/Ctracker.h \
  40. Tracker/defines.h \
  41. Tracker/HungarianAlg.h \
  42. Tracker/Kalman.h \
  43. Tracker/ShortPathCalculator.h \
  44. Tracker/track.h \
  45. Tracker/Tracking.hpp \
  46. roiaware_pool3d.h
  47. INCLUDEPATH+=Tracker
  48. CUDA_SOURCES += \
  49. nms.cu \
  50. postprocess.cu \
  51. preprocess.cu \
  52. scatter.cu \
  53. roiaware_pool3d_kernel.cu
  54. CUDA_SDK = "/usr/local/cuda/" # cudaSDK路径
  55. CUDA_DIR = "/usr/local/cuda/" # CUDA tookit路径
  56. SYSTEM_NAME = linux # 自己系统环境 'Win32', 'x64', or 'Win64'
  57. SYSTEM_TYPE = 64 #操作系统位数 '32' or '64',
  58. CUDA_ARCH = sm_72 # cuda架构, for example 'compute_10', 'compute_11', 'sm_10'
  59. NVCC_OPTIONS = --use_fast_math --compiler-options "-fPIC"
  60. # include paths
  61. INCLUDEPATH += $$CUDA_DIR/include
  62. #INCLUDEPATH += /usr/local/cuda-10.0/targets/aarch64-linux/include/crt
  63. # library directories
  64. QMAKE_LIBDIR += $$CUDA_DIR/lib/
  65. CUDA_OBJECTS_DIR = ./
  66. # The following library conflicts with something in Cuda
  67. #QMAKE_LFLAGS_RELEASE = /NODEFAULTLIB:msvcrt.lib
  68. #QMAKE_LFLAGS_DEBUG = /NODEFAULTLIB:msvcrtd.lib
  69. # Add the necessary libraries
  70. CUDA_LIBS = cudart cufft
  71. # The following makes sure all path names (which often include spaces) are put between quotation marks
  72. CUDA_INC = $$join(INCLUDEPATH,'" -I"','-I"','"')
  73. NVCC_LIBS = $$join(CUDA_LIBS,' -l','-l', '')
  74. #LIBS += $$join(CUDA_LIBS,'.so ', '', '.so')
  75. # Configuration of the Cuda compiler
  76. CONFIG(debug, debug|release) {
  77. # Debug mode
  78. cuda_d.input = CUDA_SOURCES
  79. cuda_d.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o
  80. 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}
  81. cuda_d.dependency_type = TYPE_C
  82. QMAKE_EXTRA_COMPILERS += cuda_d
  83. }
  84. else {
  85. # Release mode
  86. cuda.input = CUDA_SOURCES
  87. cuda.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o
  88. cuda.commands = $$CUDA_DIR/bin/nvcc $$NVCC_OPTIONS $$CUDA_INC $$NVCC_LIBS --machine $$SYSTEM_TYPE -arch=$$CUDA_ARCH -O3 -c -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_NAME}
  89. cuda.dependency_type = TYPE_C
  90. QMAKE_EXTRA_COMPILERS += cuda
  91. }
  92. LIBS += -L/usr/local/cuda-10.2/targets/aarch64-linux/lib
  93. LIBS += -lcudart -lcufft -lyaml-cpp
  94. #LIBS += -L/home/adc/soft/cudnn-10.2-linux-x64-v7.6.5.32/cuda/lib64 -lcudnn
  95. LIBS += -lnvinfer -lnvonnxparser -lnvcaffe_parser
  96. #LIBS += -L/home/nvidia/git/libtorch_gpu-1.6.0-linux-aarch64/lib -ltorch_cuda -ltorch -lc10 -ltorch_cpu
  97. unix:INCLUDEPATH += /usr/include/eigen3
  98. unix:INCLUDEPATH += /usr/include/pcl-1.7
  99. unix:INCLUDEPATH += /usr/include/pcl-1.8
  100. !include(../../../include/common.pri ) {
  101. error( "Couldn't find the common.pri file!" )
  102. }
  103. !include(../../../include/ivprotobuf.pri ) {
  104. error( "Couldn't find the ivprotobuf.pri file!" )
  105. }
  106. LIBS += -lboost_system
  107. unix:LIBS += -lpcl_common\
  108. -lpcl_features\
  109. -lpcl_filters\
  110. -lpcl_io\
  111. -lpcl_io_ply\
  112. -lpcl_kdtree\
  113. -lpcl_keypoints\
  114. -lpcl_octree\
  115. -lpcl_outofcore\
  116. -lpcl_people\
  117. -lpcl_recognition\
  118. -lpcl_registration\
  119. -lpcl_sample_consensus\
  120. -lpcl_search\
  121. -lpcl_segmentation\
  122. -lpcl_surface\
  123. -lpcl_tracking\
  124. -lpcl_visualization
  125. INCLUDEPATH += /usr/include/opencv4/
  126. LIBS += /usr/lib/aarch64-linux-gnu/libopencv*.so