diff --git a/elastic-ctr/client/CMakeLists.txt b/elastic-ctr/client/CMakeLists.txt index 3224b1c716094119a178d5e0311b1264634e17c9..4aee909931325cb6624f58c777aa3f6f66fbf933 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 efc16c5b8a36aefbc742d4366ef36b9c69f578a6..978d8b28d9625cf1181d0f9d05456a5933b02b1c 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;