From d7ce5650b3a73ee17391373f106676f86afb4ba6 Mon Sep 17 00:00:00 2001 From: wangguibao Date: Thu, 31 Oct 2019 17:25:51 +0800 Subject: [PATCH] elastic_ctr --- elastic-ctr/client/CMakeLists.txt | 27 +++++++++++++++++++++++- elastic-ctr/client/api/elastic_ctr_api.h | 1 - 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/elastic-ctr/client/CMakeLists.txt b/elastic-ctr/client/CMakeLists.txt index 3224b1c7..4aee9099 100644 --- a/elastic-ctr/client/CMakeLists.txt +++ b/elastic-ctr/client/CMakeLists.txt @@ -6,7 +6,7 @@ list(APPEND elasticctr_srcs ${sdk_cpp_srcs}) list(APPEND elasticctr_srcs ${CMAKE_CURRENT_LIST_DIR}/api/elastic_ctr_api.cpp) -add_library(elasticctr ${elasticctr_srcs}) +add_library(elasticctr SHARED ${elasticctr_srcs}) target_link_libraries(elasticctr brpc configure protobuf leveldb) add_executable(elastic_ctr_demo ${CMAKE_CURRENT_LIST_DIR}/demo/demo.cpp) @@ -20,3 +20,28 @@ install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/demo/conf DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/elastic_ctr/client/) install(DIRECTORY ${CMAKE_CURRENT_LIST_DIR}/demo/data/ctr_prediction DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/elastic_ctr/client/data) + +install(TARGETS elasticctr + LIBRARY DESTINATION + ${PADDLE_SERVING_INSTALL_DIR}/elastic_ctr/api/lib) +install(FILES ${CMAKE_CURRENT_LIST_DIR}/api/elastic_ctr_api.h + DESTINATION + ${PADDLE_SERVING_INSTALL_DIR}/elastic_ctr/api/include/elastic-ctr/client/api/) +install(FILES + ${CMAKE_BINARY_DIR}/elastic-ctr/client/elastic_ctr_prediction.pb.h + ${CMAKE_BINARY_DIR}/elastic-ctr/client/pds_option.pb.h + ${CMAKE_BINARY_DIR}/elastic-ctr/client/builtin_format.pb.h + DESTINATION + ${PADDLE_SERVING_INSTALL_DIR}/elastic_ctr/api/include/elastic-ctr/client/) +install(DIRECTORY ${CMAKE_SOURCE_DIR}/sdk-cpp/include + DESTINATION + ${PADDLE_SERVING_INSTALL_DIR}/elastic_ctr/api/include/sdk-cpp/) +install(DIRECTORY + ${CMAKE_BINARY_DIR}/third_party/install/protobuf/include/google + ${CMAKE_BINARY_DIR}/third_party/install/brpc/include/brpc + ${CMAKE_BINARY_DIR}/third_party/install/brpc/include/butil + ${CMAKE_BINARY_DIR}/third_party/install/brpc/include/bthread + ${CMAKE_BINARY_DIR}/third_party/install/gflags/include/gflags + ${CMAKE_BINARY_DIR}/third_party/install/glog/include/glog + DESTINATION + ${PADDLE_SERVING_INSTALL_DIR}/elastic_ctr/api/include) diff --git a/elastic-ctr/client/api/elastic_ctr_api.h b/elastic-ctr/client/api/elastic_ctr_api.h index efc16c5b..978d8b28 100644 --- a/elastic-ctr/client/api/elastic_ctr_api.h +++ b/elastic-ctr/client/api/elastic_ctr_api.h @@ -18,7 +18,6 @@ #include #include #include "elastic-ctr/client/elastic_ctr_prediction.pb.h" -#include "sdk-cpp/include/common.h" #include "sdk-cpp/include/predictor_sdk.h" using baidu::paddle_serving::sdk_cpp::Predictor; -- GitLab