Skip to content

Commit

Permalink
Fix build on jetson problem (PaddlePaddle#299)
Browse files Browse the repository at this point in the history
Fix build on jetson problem:
  • Loading branch information
jiangjiajun authored Sep 28, 2022
1 parent 47cdd8e commit 04d72c4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
14 changes: 10 additions & 4 deletions FastDeploy.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ set(ENABLE_TRT_BACKEND @ENABLE_TRT_BACKEND@)
set(ENABLE_PADDLE_FRONTEND @ENABLE_PADDLE_FRONTEND@)
set(ENABLE_VISION @ENABLE_VISION@)
set(ENABLE_TEXT @ENABLE_TEXT@)
set(BUILD_ON_JETON @BUILD_ON_JETSON@)
set(BUILD_ON_JETSON @BUILD_ON_JETSON@)
set(PADDLEINFERENCE_VERSION @PADDLEINFERENCE_VERSION@)
set(OPENVINO_VERSION @OPENVINO_VERSION@)
set(WITH_LITE_STATIC @WITH_LITE_STATIC@)
Expand Down Expand Up @@ -109,9 +109,15 @@ if(WITH_GPU)
list(APPEND FASTDEPLOY_LIBS ${CUDA_LIB})

if (ENABLE_TRT_BACKEND)
find_library(TRT_INFER_LIB nvinfer ${CMAKE_CURRENT_LIST_DIR}/third_libs/install/tensorrt/lib NO_DEFAULT_PATH)
find_library(TRT_ONNX_LIB nvonnxparser ${CMAKE_CURRENT_LIST_DIR}/third_libs/install/tensorrt/lib NO_DEFAULT_PATH)
find_library(TRT_PLUGIN_LIB nvinfer_plugin ${CMAKE_CURRENT_LIST_DIR}/third_libs/install/tensorrt/lib NO_DEFAULT_PATH)
if(BUILD_ON_JETSON)
find_library(TRT_INFER_LIB nvinfer /usr/include/aarch64-linux-gnu/)
find_library(TRT_ONNX_LIB nvonnxparser /usr/include/aarch64-linux-gnu/)
find_library(TRT_PLUGIN_LIB nvinfer_plugin /usr/include/aarch64-linux-gnu/)
else()
find_library(TRT_INFER_LIB nvinfer ${CMAKE_CURRENT_LIST_DIR}/third_libs/install/tensorrt/lib NO_DEFAULT_PATH)
find_library(TRT_ONNX_LIB nvonnxparser ${CMAKE_CURRENT_LIST_DIR}/third_libs/install/tensorrt/lib NO_DEFAULT_PATH)
find_library(TRT_PLUGIN_LIB nvinfer_plugin ${CMAKE_CURRENT_LIST_DIR}/third_libs/install/tensorrt/lib NO_DEFAULT_PATH)
endif()
list(APPEND FASTDEPLOY_LIBS ${TRT_INFER_LIB} ${TRT_ONNX_LIB} ${TRT_PLUGIN_LIB})
endif()
endif()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PROJECT(infer_demo C CXX)
CMAKE_MINIMUM_REQUIRED (VERSION 3.12)
CMAKE_MINIMUM_REQUIRED (VERSION 3.10)

# 指定下载解压后的fastdeploy库路径
option(FASTDEPLOY_INSTALL_DIR "Path of downloaded fastdeploy sdk.")
Expand Down

0 comments on commit 04d72c4

Please sign in to comment.