diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index 5aa7a8a752f7c9d2ed4942ef5bec4726c61c24d8..9f0adef7aa603ec5a3c8a5aa347613f462c43e60 100644 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -200,6 +200,13 @@ if (WITH_ANAKIN AND WITH_MKL) list(APPEND inference_deps anakin_inference_lib) endif () +if (TENSORRT_FOUND) + copy(tensorrt_lib DEPS ${inference_deps} + SRCS ${TENSORRT_ROOT}/include/Nv*.h ${TENSORRT_ROOT}/lib/libnvinfer* + DSTS ${FLUID_INSTALL_DIR}/third_party/install/tensorrt/include ${FLUID_INSTALL_DIR}/third_party/install/tensorrt/lib) +endif () + + set(module "inference") if(WIN32) set(paddle_fluid_lib ${PADDLE_BINARY_DIR}/paddle/fluid/inference/${CMAKE_BUILD_TYPE}/libpaddle_fluid.*)