link
cmake_minimum_required(VERSION 2.8.3)
project(centerpoint)
set(USE_CUDA True)
# For TensorRT sample lib
# set(TRT_ROOT /home/wanghao/Desktop/projects/TensorRT)
include_directories(../TensorRT-8/lib)
include_directories(../TensorRT-8/include)
include_directories(
common
)
set(SAMPLES_COMMON_SOURCES
common/logger.cpp
)
#set(SAMPLE_SOURCES samplecenterpoint.cpp)
#set(SAMPLE_PARSERS "onnx")
#include(
#~/TensorRT/samples/CMakeSamplesTemplate.txt
# )
# pcl and boost related !
#find_package(PCL REQUIRED)
#find_package(Boost COMPONENTS program_options REQUIRED )
#include_directories(${Boost_INCLUDE_DIRS})
#link_directories(${Boost_LIBRARY_DIRS})
message("cut Boost")
#include_directories(${PCL_INCLUDE_DIRS})
#link_directories(${PCL_LIBRARY_DIRS})
#add_definitions(${PCL_DEFINITIONS})
message("cut pcl")
# set flags for CUDA availability
option(CUDA_AVAIL "CUDA available" OFF)
find_package(CUDA)
message("CUDA dir paths", ${CUDA_LIBRARIES})
include_directories(
${PROJECT_SOURCE_DIR}
${PROJECT_SOURCE_DIR}/include
${CUDA_INCLUDE_DIRS}
)
message("cut tensorrt..")
file(GLOB PointPillarLibs ${PROJECT_SOURCE_DIR}/**cpp)
add_library(pointpillars SHARED ${PointPillarLibs})
file(GLOB PointPillarCU ${PROJECT_SOURCE_DIR}/**cu)
cuda_add_library(pointpillarsCU SHARED ${PointPillarCU})
set(CUDA_LIB_PATH /usr/local/cuda/lib64/)
add_executable(centerpoint samplecenterpoint.cpp ${SAMPLES_COMMON_SOURCES})
target_link_libraries(pointpillars nvonnxparser)
target_link_libraries(centerpoint
#${PCL_LIBRARIES}
#${Boost_LIBRARIES}
${CUDA_LIBRARY}
${CUDA_RUNTIME_LIBRARY}
nvonnxparser
nvinfer
pointpillars
${CUDA_LIB_PATH}libcudart.so
pointpillarsCU
)
#add_executable(samplerpn samplerpn.cpp ${SAMPLES_COMMON_SOURCES})
#target_link_libraries(samplerpn
# ${PCL_LIBRARIES}
# ${Boost_LIBRARIES}
# ${CUDA_LIBRARY}
# ${CUDA_RUNTIME_LIBRARY}
# nvonnxparser
# nvinfer
# pointpillars
# ${CUDA_LIB_PATH}libcudart.so
# #pointpillarsCU
# )
#file(GLOB PointPillarLibs ${PROJECT_SOURCE_DIR}/nodes/**)
##file(GLOB PointPillarCU ${PROJECT_SOURCE_DIR}/nodes/**cu)
#
#message("PointPillarLibsNodes",${PointPillarLibs})
##add_library(point_pillars SHARED ${PointPillarLibs})
#cuda_add_library(point_pillars SHARED ${PointPillarLibs})
#
##link_directories(${PROJECT_SOURCE_DIR}/nodes)
#link_libraries (
# point_pillars
# ${PCL_LIBRARIES}
# ${Boost_LIBRARIES}
# ${CUDA_LIBRARY}
# ${CUDA_RUNTIME_LIBRARY}
# )
#add_executable(lidar_point_pillars ${PROJECT_SOURCE_DIR}/nodes/lidar_point_pillar_test.cpp)
#
#target_link_libraries (lidar_point_pillars
# ${PCL_LIBRARIES}
# ${Boost_LIBRARIES}
# ${CUDA_LIBRARY}
# ${CUDA_RUNTIME_LIBRARY}
# point_pillars
# nvonnxparser
# )