From 7ad8acefef9e9e1be9ecf70d605712f77de6d0b2 Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Mon, 25 Dec 2023 06:28:35 +0000 Subject: [PATCH 1/7] fix windows bug --- cmake/inference_lib.cmake | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index 06dc5d6173794a..7c97361af204c5 100755 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -236,7 +236,11 @@ copy( copy_part_of_thrid_party(inference_lib_dist ${PADDLE_INFERENCE_INSTALL_DIR}) set(src_dir "${PADDLE_SOURCE_DIR}/paddle/fluid") - +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) if(WIN32) if(WITH_STATIC_LIB) set(paddle_inference_lib @@ -268,11 +272,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( From 729f309bd2934ff9c28cb8fce4742c4a48e53033 Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Mon, 25 Dec 2023 08:54:19 +0000 Subject: [PATCH 2/7] fix windows bug --- cmake/inference_lib.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index 7c97361af204c5..ddc730056901c0 100755 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -236,7 +236,7 @@ copy( copy_part_of_thrid_party(inference_lib_dist ${PADDLE_INFERENCE_INSTALL_DIR}) set(src_dir "${PADDLE_SOURCE_DIR}/paddle/fluid") -set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/libcommon.*) +set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/common.dll) copy( inference_lib_dist SRCS ${paddle_common_lib} From 78dbd75f1e02c1a6ea2b7c55ee730d469808796e Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Mon, 25 Dec 2023 10:20:56 +0000 Subject: [PATCH 3/7] fix windows bug --- cmake/inference_lib.cmake | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index ddc730056901c0..ddc7aaa5fa7be5 100755 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -236,11 +236,19 @@ copy( copy_part_of_thrid_party(inference_lib_dist ${PADDLE_INFERENCE_INSTALL_DIR}) set(src_dir "${PADDLE_SOURCE_DIR}/paddle/fluid") -set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/common.dll) +if(WIN32) + set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/common.dll) +elseif(APPLE) + set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/libcommon.dylib) +else() + set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/libcommon.so) +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 From 87d848bd7c15c352063f2da2a80d21137587b63b Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Mon, 25 Dec 2023 10:24:19 +0000 Subject: [PATCH 4/7] fix windows bug --- cmake/inference_lib.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index ddc7aaa5fa7be5..8d872f24c8e092 100755 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -239,9 +239,9 @@ set(src_dir "${PADDLE_SOURCE_DIR}/paddle/fluid") if(WIN32) set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/common.dll) elseif(APPLE) - set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/libcommon.dylib) + set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/libcommon.*) else() - set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/libcommon.so) + set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/libcommon.*) endif() copy( From fc9f42abe81e4ab869c2305cb0bb2fc22f131372 Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Mon, 25 Dec 2023 10:30:27 +0000 Subject: [PATCH 5/7] fix windows bug --- cmake/inference_lib.cmake | 2 -- 1 file changed, 2 deletions(-) diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index 8d872f24c8e092..1d27c8c9a81eaa 100755 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -238,8 +238,6 @@ 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.dll) -elseif(APPLE) - set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/libcommon.*) else() set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/libcommon.*) endif() From 1fa5313153134e7991e420bda521b48dd45b3604 Mon Sep 17 00:00:00 2001 From: risemeup1 <515586620@qq.com> Date: Mon, 25 Dec 2023 10:30:50 +0000 Subject: [PATCH 6/7] fix windows bug --- cmake/inference_lib.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index 1d27c8c9a81eaa..f8a647e3802b47 100755 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -236,12 +236,12 @@ copy( 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.dll) else() set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/libcommon.*) endif() - copy( inference_lib_dist SRCS ${paddle_common_lib} From f2e452ee26fab86213f516a437d47fb286110212 Mon Sep 17 00:00:00 2001 From: risemeup1 <62429225+risemeup1@users.noreply.github.com> Date: Tue, 26 Dec 2023 12:07:44 +0800 Subject: [PATCH 7/7] Update inference_lib.cmake --- cmake/inference_lib.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/inference_lib.cmake b/cmake/inference_lib.cmake index f8a647e3802b47..517ac24cccc72e 100755 --- a/cmake/inference_lib.cmake +++ b/cmake/inference_lib.cmake @@ -238,7 +238,7 @@ 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.dll) + set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/common.*) else() set(paddle_common_lib ${PADDLE_BINARY_DIR}/paddle/common/libcommon.*) endif()