CMakeLists.txt 3.3 KB
Newer Older
W
wangguibao 已提交
1
include(proto/CMakeLists.txt)
W
wangguibao 已提交
2 3 4
include(common/CMakeLists.txt)
include(op/CMakeLists.txt)
include(framework/CMakeLists.txt)
W
wangguibao 已提交
5 6 7 8 9 10 11 12 13 14 15 16 17 18
include(plugin/CMakeLists.txt)
include(src/CMakeLists.txt)

add_executable(pdcodegen ${pdcodegen_srcs})
target_link_libraries(pdcodegen protobuf ${PROTOBUF_PROTOC_LIBRARY})
target_include_directories(pdcodegen PUBLIC
        ${CMAKE_CURRENT_LIST_DIR}/
        ${CMAKE_CURRENT_BINARY_DIR}/)

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 已提交
19
add_dependencies(pdserving protobuf boost brpc leveldb bsl pdcodegen configure
W
wangguibao 已提交
20
        proto_configure
W
wangguibao 已提交
21
        ullib spreg mempool)
W
wangguibao 已提交
22 23 24 25

target_include_directories(pdserving PUBLIC
        ${CMAKE_CURRENT_LIST_DIR}/
        ${CMAKE_CURRENT_BINARY_DIR}/
W
wangguibao 已提交
26
        ${CMAKE_CURRENT_BINARY_DIR}/../proto_configure
W
wangguibao 已提交
27
        ${CMAKE_CURRENT_LIST_DIR}/../configure
W
wangguibao 已提交
28
        ${CMAKE_CURRENT_LIST_DIR}/../proto_configure/include
W
wangguibao 已提交
29 30 31 32
        ${CMAKE_CURRENT_LIST_DIR}/../mempool
        ${CMAKE_CURRENT_LIST_DIR}/../spreg
        ${CMAKE_CURRENT_LIST_DIR}/../ullib/include
        ${CMAKE_CURRENT_BINARY_DIR}/../bsl/include)
W
wangguibao 已提交
33 34 35
target_link_libraries(pdserving
        brpc protobuf boost leveldb bsl configure proto_configure ullib spreg
        mempool -lpthread -lcrypto -lm -lrt -lssl -ldl -lz)
W
wangguibao 已提交
36

W
wangguibao 已提交
37 38 39 40 41
add_executable(pdserving_exe ${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 已提交
42 43 44
add_dependencies(pdserving_exe
        protobuf boost brpc leveldb bsl pdcodegen configure proto_configure
        ullib spreg mempool)
W
wangguibao 已提交
45 46 47 48

target_include_directories(pdserving_exe PUBLIC
        ${CMAKE_CURRENT_LIST_DIR}/
        ${CMAKE_CURRENT_BINARY_DIR}/
W
wangguibao 已提交
49
        ${CMAKE_CURRENT_BINARY_DIR}/../proto_configure
W
wangguibao 已提交
50
        ${CMAKE_CURRENT_LIST_DIR}/../configure
W
wangguibao 已提交
51
        ${CMAKE_CURRENT_LIST_DIR}/../proto_configure/include
W
wangguibao 已提交
52 53 54 55
        ${CMAKE_CURRENT_LIST_DIR}/../mempool
        ${CMAKE_CURRENT_LIST_DIR}/../spreg
        ${CMAKE_CURRENT_LIST_DIR}/../ullib/include
        ${CMAKE_CURRENT_BINARY_DIR}/../bsl/include)
W
wangguibao 已提交
56 57 58
target_link_libraries(pdserving_exe brpc protobuf leveldb bsl configure
        proto_configure ullib spreg mempool -lpthread -lcrypto -lm -lrt -lssl
        -ldl -lz)
W
wangguibao 已提交
59 60

add_library(pdclient ${pdclient_srcs})
W
wangguibao 已提交
61
set_source_files_properties(
W
wangguibao 已提交
62
        ${pdclient_srcs}
W
wangguibao 已提交
63
        PROPERTIES
W
wangguibao 已提交
64
        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 已提交
65
add_dependencies(pdclient protobuf boost brpc pdcodegen proto_configure)
W
wangguibao 已提交
66 67

target_include_directories(pdclient PUBLIC
W
wangguibao 已提交
68 69
        ${CMAKE_CURRENT_LIST_DIR}/
        ${CMAKE_CURRENT_BINARY_DIR}/
W
wangguibao 已提交
70
        ${CMAKE_CURRENT_BINARY_DIR}/../proto_configure
W
wangguibao 已提交
71
        ${CMAKE_CURRENT_LIST_DIR}/../configure
W
wangguibao 已提交
72
        ${CMAKE_CURRENT_LIST_DIR}/../proto_configure/include
W
wangguibao 已提交
73 74 75 76
        ${CMAKE_CURRENT_LIST_DIR}/../mempool
        ${CMAKE_CURRENT_LIST_DIR}/../spreg
        ${CMAKE_CURRENT_LIST_DIR}/../ullib/include
        ${CMAKE_CURRENT_BINARY_DIR}/../bsl/include)
W
serving  
wangguibao 已提交
77
target_link_libraries(pdclient protobuf boost brpc -lpthread -lcrypto -lm -lrt -lssl -ldl -lz)
W
wangguibao 已提交
78