CMakeLists.txt 755 字节
Newer Older
W
wangguibao 已提交
1
LIST(APPEND protofiles
W
wangguibao 已提交
2 3
        ${CMAKE_CURRENT_LIST_DIR}/proto/server_configure.proto
        ${CMAKE_CURRENT_LIST_DIR}/proto/sdk_configure.proto
4
        ${CMAKE_CURRENT_LIST_DIR}/proto/inferencer_configure.proto
W
wangguibao 已提交
5 6 7
)

PROTOBUF_GENERATE_CPP(configure_proto_srcs configure_proto_hdrs ${protofiles})
8
list(APPEND configure_srcs ${configure_proto_srcs})
W
wangguibao 已提交
9

10
list(APPEND configure_srcs ${CMAKE_CURRENT_LIST_DIR}/src/configure_parser.cpp)
W
wangguibao 已提交
11

12
add_library(configure ${configure_srcs})
W
wangguibao 已提交
13 14 15 16 17 18 19

add_executable(test_configure
        ${CMAKE_CURRENT_LIST_DIR}/tests/test_configure.cpp)
target_include_directories(test_configure PUBLIC
        ${CMAKE_CURRENT_BINARY_DIR}/
        ${CMAKE_CURRENT_LIST_DIR}/include
        )
20
target_link_libraries(test_configure configure protobuf)