forked from isarsoft/yolov4-triton-tensorrt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
26 lines (21 loc) · 929 Bytes
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
cmake_minimum_required(VERSION 3.5)
PROJECT(yolov4-triton-tensorrt VERSION 1.1.0 LANGUAGES CXX)
# CUDA
find_package(CUDA REQUIRED)
set(CUDA_NVCC_PLAGS ${CUDA_NVCC_PLAGS};-std=c++11;-g;-G;-gencode;arch=compute_75;code=sm_75)
if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
message("embed_platform on")
include_directories(/usr/local/cuda/targets/aarch64-linux/include)
link_directories(/usr/local/cuda/targets/aarch64-linux/lib)
else()
message("embed_platform off")
include_directories(/usr/local/cuda/include)
link_directories(/usr/local/cuda/lib64)
endif()
# LAYER PLUGIN LIB
cuda_add_library(layerplugin SHARED ${PROJECT_SOURCE_DIR}/layers/yololayer.cu)
# needs to be linked here because triton will not have those libs preloaded!
target_link_libraries(layerplugin nvinfer cudart)
# EXECUTABLE
add_executable(main ${PROJECT_SOURCE_DIR}/main.cpp)
target_link_libraries(main nvinfer cudart layerplugin)