CMakeLists.txt 1.5 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)
W
wangjiawei04 已提交
6
include(tools/CMakeLists.txt)
W
wangguibao 已提交
7 8
include(src/CMakeLists.txt)

W
wangjiawei04 已提交
9

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

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

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

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

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

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