Last active
July 30, 2018 07:57
-
-
Save harderthan/b86161eecf88c113065734646c480b2b to your computer and use it in GitHub Desktop.
TensorRT_with-ROS_CMakeLists
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# by Kwanghoe, [email protected] | |
#------------------------------------------------------------------------------- | |
cmake_minimum_required(VERSION 2.8.3) | |
project(rt_example) | |
add_compile_options(-std=c++11) | |
#------------------------------------------------------------------------------- | |
# Find Cuda and Additional packages | |
if(VIBRANTE) | |
set(ARCH_DIR "aarch64-linux") | |
else() | |
set(ARCH_DIR "x86_64-linux") | |
endif() | |
set(cuda_runtime_api_DIR /usr/local/cuda/targets/${ARCH_DIR}/include CACHE INTERNAL "") | |
find_package(CUDA) | |
include_directories(${cuda_runtime_api_DIR}) | |
include_directories(/usr/local/nvidia/tensorrt/include) | |
#------------------------------------------------------------------------------- | |
# Catkin | |
find_package(catkin REQUIRED COMPONENTS | |
roscpp | |
std_msgs | |
) | |
catkin_package() | |
include_directories( | |
${catkin_INCLUDE_DIRS} | |
) | |
#------------------------------------------------------------------------------- | |
set(SOURCE src/main.cpp) | |
include_directories(${PROJECT_SOURCE_DIR}/include) | |
add_executable(${PROJECT_NAME}_node ${SOURCE}) | |
target_link_libraries(${PROJECT_NAME}_node | |
${catkin_LIBRARIES} | |
${CUDA_LIBRARIES} | |
nvinfer | |
nvparsers | |
nvinfer_plugin | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment