首页 > 其他分享 >https://github.com/Abraham423/CenterPointTensorRT 的cmake

https://github.com/Abraham423/CenterPointTensorRT 的cmake

时间:2023-01-16 11:33:53浏览次数:80  
标签:github cmake CenterPointTensorRT directories LIBRARY LIBRARIES link CUDA include


​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
# )


标签:github,cmake,CenterPointTensorRT,directories,LIBRARY,LIBRARIES,link,CUDA,include
From: https://blog.51cto.com/u_15202985/6010276

相关文章

  • cmake 检测Boost库
    ​​link​​#setminimumcmakeversioncmake_minimum_required(VERSION3.5FATAL_ERROR)#projectnameandlanguageproject(recipe-08LANGUAGESCXX)set(CMAKE_CXX_S......
  • cmake 检测Eigen库
    ​​代码在git​​cmake_minimum_required(VERSION3.9FATAL_ERROR)project(recipe-07LANGUAGESCXX)set(CMAKE_CXX_STANDARD11)set(CMAKE_CXX_EXTENSIONSOFF)set(CMAKE......
  • cmake --build 与 make
    为什么不直接make,而是使用cmake--build形式的命令,主要是为了跨平台,使用这种形式后,不管你是使用的什么生成器,CMake都能正确构建,否则如果使用的是Ninja或者其他生成器,......
  • CMake 菜鸟升级指南
    ​注!看参考资料一边学习一边整理的,只整理了自己能理解的部分,更详细的内容大家去挖官方的文档哈!应知应会每一个要管理的目录都要包含一个CMakeLists.txt。(这个文件名不能有......
  • cmake configure_file 评价
    cmakeconfigure_file大白话的意思就是:你可以用config.h.in模板自动生成config.h头文件,模板的参数在CMakeLists.txt里面这样我们下次直接只用修改CMakeLi......
  • 过年必备!亲戚计算器「GitHub 热点速览 v.23.02」
    过完这周大家就要开始为期7天的春节长假了,当然有些HG小伙伴拥有了10+天的长假就低调点不要告诉他人,以免招人妒忌。春节必经的事情可能就是走亲戚了,所以本周特推选取......
  • 记录一次github上传数据的过程
    首先登录github,密码忘记了就找回,重置一下。创建新的repository用pycharm自带的git工具上传数据首先会提示你未安装git,就安装一下。下来,授权pycharm和GitHub的访问。这......
  • Windows配置SSHKey到GItHub
    一、检查环境在Linux和Mac系统中都自动安装了SSH,Windows系统需要安装GitBash。首先检查下本机是否已经安装了SSH,在终端输入​​ssh​​即可:二、生成sshkey输入:​​ssh-......
  • 怎么删除github上的仓库?
    1.到你的个人中心.点击你的个人账号.下图的红色部分2.点击repositories(仓库),选择你要删除的项目3.code这一行导航栏最后的一个.setting4.下拉页面到最下面Deletethis......
  • Cmake项目结构
    -project-CMakeLists.txt-include/-project/*.h-src/-CMakeLists.txt-*.cpp-apps/-CMakeLists.txt-app.cpp-tests/CMakeLists.txttest.cpp-extern/googletes......