From af2ceff857333818aa3760e7b17f8af1f5b072ef Mon Sep 17 00:00:00 2001 From: Jason Date: Wed, 4 Jan 2023 10:53:12 +0800 Subject: [PATCH] [Compile] Support build on jetson without python (#1045) support jetson build --- cmake/paddle_inference.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/paddle_inference.cmake b/cmake/paddle_inference.cmake index e33a14eb6..6d5c8f0c1 100644 --- a/cmake/paddle_inference.cmake +++ b/cmake/paddle_inference.cmake @@ -67,7 +67,13 @@ if(PADDLEINFERENCE_DIRECTORY) endif() find_package(Python COMPONENTS Interpreter Development REQUIRED) message(STATUS "Copying ${PADDLEINFERENCE_DIRECTORY} to ${THIRD_PARTY_PATH}/install/paddle_inference ...") - execute_process(COMMAND ${Python_EXECUTABLE} ${PROJECT_SOURCE_DIR}/scripts/copy_directory.py ${PADDLEINFERENCE_DIRECTORY} ${THIRD_PARTY_PATH}/install/paddle_inference) + if(WIN32) + message(FATAL_ERROR "Define PADDLEINFERENCE_DIRECTORY is not supported on Windows platform.") + else() + execute_process(COMMAND mkdir -p ${THIRD_PARTY_PATH}/install) + execute_process(COMMAND cp -r ${PADDLEINFERENCE_DIRECTORY} ${THIRD_PARTY_PATH}/install/paddle_inference) + execute_process(COMMAND rm -rf ${THIRD_PARTY_PATH}/install/paddle_inference/paddle/lib/*.a) + endif() else() set(PADDLEINFERENCE_URL_BASE "https://bj.bcebos.com/fastdeploy/third_libs/") set(PADDLEINFERENCE_VERSION "2.4-dev4")