CenterPoint.pro 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171
  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 += src/main.cpp \
  17. src/centerpoint.cpp \
  18. src/postprocess.cpp \
  19. src/preprocess.cpp \
  20. include/common/logger.cpp \
  21. ../../include/msgtype/object.pb.cc \
  22. ../../include/msgtype/objectarray.pb.cc \
  23. CUDA_SOURCES += \
  24. src/iou3d_nms_kernel.cu \
  25. src/preprocess.cu \
  26. src/scatter_cuda.cu
  27. DISTFILES += \
  28. src/iou3d_nms_kernel.cu \
  29. src/preprocess.cu \
  30. src/scatter_cuda.cu
  31. INCLUDEPATH+= /home/nvidia/modularization/src/detection/CenterPoint-master/include \
  32. /home/nvidia/modularization/src/detection/CenterPoint-master/include/common
  33. HEADERS += \
  34. include/config.h \
  35. ../../include/msgtype/object.pb.h \
  36. ../../include/msgtype/objectarray.pb.h
  37. CUDA_SDK = "/usr/local/cuda/" # cudaSDK路径
  38. CUDA_DIR = "/usr/local/cuda/" # CUDA tookit路径
  39. SYSTEM_NAME = linux # 自己系统环境 'Win32', 'x64', or 'Win64'
  40. SYSTEM_TYPE = 64 #操作系统位数 '32' or '64',
  41. CUDA_ARCH = sm_72 # cuda架构, for example 'compute_10', 'compute_11', 'sm_10'
  42. NVCC_OPTIONS = --use_fast_math --compiler-options "-fPIC"
  43. # include paths
  44. INCLUDEPATH += $$CUDA_DIR/include
  45. #INCLUDEPATH += /usr/local/cuda-10.0/targets/aarch64-linux/include/crt
  46. # library directories
  47. QMAKE_LIBDIR += $$CUDA_DIR/lib/
  48. CUDA_OBJECTS_DIR = ./
  49. # The following library conflicts with something in Cuda
  50. #QMAKE_LFLAGS_RELEASE = /NODEFAULTLIB:msvcrt.lib
  51. #QMAKE_LFLAGS_DEBUG = /NODEFAULTLIB:msvcrtd.lib
  52. # Add the necessary libraries
  53. CUDA_LIBS = cudart cufft
  54. # The following makes sure all path names (which often include spaces) are put between quotation marks
  55. CUDA_INC = $$join(INCLUDEPATH,'" -I"','-I"','"')
  56. NVCC_LIBS = $$join(CUDA_LIBS,' -l','-l', '')
  57. #LIBS += $$join(CUDA_LIBS,'.so ', '', '.so')
  58. # Configuration of the Cuda compiler
  59. CONFIG(debug, debug|release) {
  60. # Debug mode
  61. cuda_d.input = CUDA_SOURCES
  62. cuda_d.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o
  63. 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}
  64. cuda_d.dependency_type = TYPE_C
  65. QMAKE_EXTRA_COMPILERS += cuda_d
  66. }
  67. else {
  68. # Release mode
  69. cuda.input = CUDA_SOURCES
  70. cuda.output = $$CUDA_OBJECTS_DIR/${QMAKE_FILE_BASE}_cuda.o
  71. 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}
  72. cuda.dependency_type = TYPE_C
  73. QMAKE_EXTRA_COMPILERS += cuda
  74. }
  75. LIBS += -L/usr/local/cuda-10.2/targets/aarch64-linux/lib
  76. LIBS += -L/usr/local/cuda/lib64
  77. LIBS += -lcudart -lcufft -lyaml-cpp
  78. #LIBS += -L/home/adc/soft/cudnn-10.2-linux-x64-v7.6.5.32/cuda/lib64 -lcudnn
  79. LIBS += -lnvinfer -lnvonnxparser -lnvcaffe_parser
  80. #LIBS += -L/home/nvidia/git/libtorch_gpu-1.6.0-linux-aarch64/lib -ltorch_cuda -ltorch -lc10 -ltorch_cpu
  81. unix:INCLUDEPATH += /usr/include/eigen3
  82. unix:INCLUDEPATH += /usr/include/pcl-1.7
  83. unix:INCLUDEPATH += /usr/include/pcl-1.8
  84. unix:INCLUDEPATH += /usr/include/pcl-1.10
  85. !include(../../../include/common.pri ) {
  86. error( "Couldn't find the common.pri file!" )
  87. }
  88. !include(../../../include/ivprotobuf.pri ) {
  89. error( "Couldn't find the ivprotobuf.pri file!" )
  90. }
  91. LIBS += -lboost_system
  92. unix:LIBS += -lpcl_common\
  93. -lpcl_features\
  94. -lpcl_filters\
  95. -lpcl_io\
  96. -lpcl_io_ply\
  97. -lpcl_kdtree\
  98. -lpcl_keypoints\
  99. -lpcl_octree\
  100. -lpcl_outofcore\
  101. -lpcl_people\
  102. -lpcl_recognition\
  103. -lpcl_registration\
  104. -lpcl_sample_consensus\
  105. -lpcl_search\
  106. -lpcl_segmentation\
  107. -lpcl_surface\
  108. -lpcl_tracking\
  109. -lpcl_visualization
  110. INCLUDEPATH += /usr/include/opencv4/
  111. LIBS += /usr/lib/aarch64-linux-gnu/libopencv*.so