CMakeLists.txt 1.0 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
wangguibao 已提交
6 7 8 9 10 11 12 13 14 15 16
include(plugin/CMakeLists.txt)
include(src/CMakeLists.txt)

add_executable(pdcodegen ${pdcodegen_srcs})
target_link_libraries(pdcodegen protobuf ${PROTOBUF_PROTOC_LIBRARY})

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

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

22
# install
W
wangguibao 已提交
23
install(TARGETS pdserving pdcodegen
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
        )