Skip to content

Commit 4ad74d4

Browse files
committed
transfusion: modernize protobuf consumption
1 parent 2e9f29c commit 4ad74d4

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

src/artery/transfusion/CMakeLists.txt

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS TransfusionMsg.proto)
2-
31
add_artery_feature(
42
transfusion
53
TransfusionLoopback.cc
64
TransfusionService.cc
7-
${PROTO_SRCS} ${PROTO_HDRS}
85
)
96

10-
target_include_directories(transfusion PRIVATE ${PROTOBUF_INCLUDE_DIRS} ${CMAKE_CURRENT_BINARY_DIR})
11-
target_link_libraries(transfusion PRIVATE ${PROTOBUF_LIBRARIES})
7+
target_link_libraries(transfusion PRIVATE protobuf::libprotobuf)
8+
9+
protobuf_generate(
10+
TARGET transfusion
11+
LANGUAGE cpp
12+
PROTOS ${CMAKE_CURRENT_SOURCE_DIR}/TransfusionMsg.proto
13+
PROTOC_OUT_DIR ${CMAKE_CURRENT_BINARY_DIR}
14+
)
15+
16+
target_include_directories(transfusion PRIVATE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)

0 commit comments

Comments
 (0)