CMakeLists.txt 1.4 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 9 10 11 12 13
include(src/CMakeLists.txt)

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
wangguibao 已提交
14
add_dependencies(pdserving protobuf boost brpc leveldb pdcodegen configure)
W
wangguibao 已提交
15

W
wangguibao 已提交
16
target_link_libraries(pdserving
W
wangguibao 已提交
17
        brpc protobuf boost leveldb configure -lpthread -lcrypto -lm -lrt -lssl -ldl -lz)
W
wangguibao 已提交
18

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

FILE(GLOB inc_common ${CMAKE_CURRENT_LIST_DIR}/common/*.h)
install(FILES ${inc_common}
        DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/include/predictor/common)

FILE(GLOB inc_framework ${CMAKE_CURRENT_LIST_DIR}/framework/*.h)
install(FILES ${inc_framework}
        DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/include/predictor/framework)

install(FILES ${CMAKE_CURRENT_LIST_DIR}/mempool/mempool.h
        DESTINATION ${PADDLE_SERVING_INSTALL_DIR}/include/predictor/mempool)