Skip to content

Commit

Permalink
Fix link deps of example
Browse files Browse the repository at this point in the history
Signed-off-by: owent <admin@owent.net>
  • Loading branch information
owent committed May 29, 2023
1 parent 234ab40 commit e9a7c47
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions examples/grpc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,14 @@ include_directories(
include_directories(${CMAKE_CURRENT_BINARY_DIR})

if(TARGET protobuf::libprotobuf)
target_link_libraries(example_grpc_proto gRPC::grpc++ protobuf::libprotobuf)
target_link_libraries(example_grpc_proto PUBLIC gRPC::grpc++
protobuf::libprotobuf)
else()
target_include_directories(example_grpc_proto ${Protobuf_INCLUDE_DIRS})
target_link_libraries(example_grpc_proto ${Protobuf_LIBRARIES})
target_include_directories(example_grpc_proto PUBLIC ${Protobuf_INCLUDE_DIRS})
target_link_libraries(example_grpc_proto PUBLIC ${Protobuf_LIBRARIES})
endif()
if(WITH_ABSEIL)
target_link_libraries(example_grpc_proto PUBLIC absl::bad_variant_access)
endif()

foreach(_target client server)
Expand Down

0 comments on commit e9a7c47

Please sign in to comment.