CMakeLists.txt 1.6 KB
Newer Older
W
wangguibao 已提交
1
include(proto/CMakeLists.txt)
W
wangguibao 已提交
2 3
include(common/CMakeLists.txt)
include(op/CMakeLists.txt)
W
wangguibao 已提交
4
include(mempool/CMakeLists.txt)
W
wangguibao 已提交
5
include(framework/CMakeLists.txt)
6
#include(plugin/CMakeLists.txt)
W
wangguibao 已提交
7 8
include(src/CMakeLists.txt)

W
wangjiawei04 已提交
9 10
include_directories(SYSTEM  ${CMAKE_CURRENT_LIST_DIR}/../kvdb/include)

W
wangguibao 已提交
11 12 13 14 15
add_library(pdserving ${pdserving_srcs})
set_source_files_properties(
        ${pdserving_srcs}
        PROPERTIES
        COMPILE_FLAGS  "-Wno-strict-aliasing -Wno-unused-variable -Wno-non-virtual-dtor -Wno-error=non-virtual-dtor -Wno-error=delete-non-virtual-dtor")
W
wangjiawei04 已提交
16
add_dependencies(pdserving protobuf kvdb boost brpc leveldb pdcodegen configure)
W
wangguibao 已提交
17

W
wangguibao 已提交
18
target_link_libraries(pdserving
W
wangjiawei04 已提交
19
        brpc protobuf boost leveldb configure kvdb -lpthread -lcrypto -lm -lrt -lssl -ldl -lz)
W
wangguibao 已提交
20

21
# install
22
install(TARGETS pdserving
23 24 25 26
        RUNTIME DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/bin
        ARCHIVE DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/lib
        LIBRARY DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/so
        )
W
wangguibao 已提交
27 28 29

FILE(GLOB inc_common ${CMAKE_CURRENT_LIST_DIR}/common/*.h)
install(FILES ${inc_common}
G
guru4elephant 已提交
30
        DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/include/core/predictor/common)
W
wangguibao 已提交
31 32 33

FILE(GLOB inc_framework ${CMAKE_CURRENT_LIST_DIR}/framework/*.h)
install(FILES ${inc_framework}
G
guru4elephant 已提交
34
        DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/include/core/predictor/framework)
W
wangguibao 已提交
35 36

install(FILES ${CMAKE_CURRENT_LIST_DIR}/mempool/mempool.h
G
guru4elephant 已提交
37
        DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/include/core/predictor/mempool)
W
wangguibao 已提交
38
install(FILES ${CMAKE_CURRENT_LIST_DIR}/op/op.h
G
guru4elephant 已提交
39
        DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/include/core/predictor/op)