CMakeLists.txt 1.7 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")
Z
zhangjun 已提交
15
add_dependencies(pdserving protobuf boost brpc leveldb pdcodegen configure extern_paddle paddle_inference)
M
bug fix  
MRXLT 已提交
16 17 18
if (WITH_TRT)
    add_definitions(-DWITH_TRT)
endif()
W
wangguibao 已提交
19
target_link_libraries(pdserving
Z
zhangjun 已提交
20
        brpc protobuf boost leveldb configure -lpthread -lcrypto -lm -lrt -lssl -ldl -lz paddle_inference ${paddle_depend_libs})
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)