diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index 06dc5d6173794a..517ac24cccc72e 100755 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -237,6 +237,16 @@ copy_part_of_thrid_party(inference_lib_dist ${PADDLE_INFERENCE_INSTALL_DIR}) set(src_dir "${PADDLE_SOURCE_DIR}/paddle/fluid") +if(WIN32) + set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/common.*) +else() + set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/libcommon.*) +endif() +copy( + inference_lib_dist + SRCS ${paddle_common_lib} + DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/lib) + if(WIN32) if(WITH_STATIC_LIB) set(paddle_inference_lib @@ -268,11 +278,6 @@ else() SRCS ${paddle_phi_lib} DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/lib) endif() - set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/libcommon.*) - copy( - inference_lib_dist - SRCS ${paddle_common_lib} - DSTS ${PADDLE_INFERENCE_INSTALL_DIR}/paddle/lib) endif() copy(