From 0b53465894eb22174c96fed971f6433021efb93c Mon Sep 17 00:00:00 2001 From: Tingquan Gao <35441050@qq.com> Date: Tue, 9 Feb 2021 18:05:59 +0800 Subject: [PATCH] Adapt to paddle inference 2.0 (#1976) --- deploy/cpp_infer/CMakeLists.txt | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/deploy/cpp_infer/CMakeLists.txt b/deploy/cpp_infer/CMakeLists.txt index 11883367..120cf06a 100644 --- a/deploy/cpp_infer/CMakeLists.txt +++ b/deploy/cpp_infer/CMakeLists.txt @@ -133,7 +133,11 @@ if(WITH_MKL) endif () endif() else() - set(MATH_LIB ${PADDLE_LIB}/third_party/install/openblas/lib/libopenblas${CMAKE_STATIC_LIBRARY_SUFFIX}) + if (WIN32) + set(MATH_LIB ${PADDLE_LIB}/third_party/install/openblas/lib/openblas${CMAKE_STATIC_LIBRARY_SUFFIX}) + else () + set(MATH_LIB ${PADDLE_LIB}/third_party/install/openblas/lib/libopenblas${CMAKE_STATIC_LIBRARY_SUFFIX}) + endif () endif() # Note: libpaddle_inference_api.so/a must put before libpaddle_fluid.so/a @@ -157,7 +161,7 @@ endif(WITH_STATIC_LIB) if (NOT WIN32) set(DEPS ${DEPS} - ${MATH_LIB} ${MKLDNN_LIB} + ${MATH_LIB} ${MKLDNN_LIB} glog gflags protobuf z xxhash ) if(EXISTS "${PADDLE_LIB}/third_party/install/snappystream/lib") -- GitLab