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

M
MRXLT 已提交
9
add_definitions(-D__STDC_FORMAT_MACROS)
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)
M
bug fix  
MRXLT 已提交
16 17 18
if (WITH_TRT)
    add_definitions(-DWITH_TRT)
endif()
W
wangguibao 已提交
19
target_link_libraries(pdserving
20
        brpc protobuf boost leveldb configure -lpthread -lcrypto -lm -lrt -lssl -ldl -lz)
W
wangguibao 已提交
21

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

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

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

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